From 4e26aba7386d6f0bfe709d85b483991eba024901 Mon Sep 17 00:00:00 2001 From: Ivan Ivanov Date: Fri, 25 Aug 2023 23:39:56 +0300 Subject: [PATCH] Do not throw when creating a project on inactive subscription --- docker-app/qfieldcloud/core/models.py | 16 ---------------- 1 file changed, 16 deletions(-) diff --git a/docker-app/qfieldcloud/core/models.py b/docker-app/qfieldcloud/core/models.py index 20b5ae6ae..6bf0b6421 100644 --- a/docker-app/qfieldcloud/core/models.py +++ b/docker-app/qfieldcloud/core/models.py @@ -1312,22 +1312,6 @@ def owner_can_create_job(self): return is_supported_regarding_owner_account(self) - def check_can_be_created(self): - from qfieldcloud.core.permissions_utils import ( - check_supported_regarding_owner_account, - ) - - check_supported_regarding_owner_account(self, ignore_online_layers=True) - - def clean(self) -> None: - """ - Prevent creating new projects if the user is inactive or over quota - """ - if self._state.adding: - self.check_can_be_created() - - return super().clean() - def save(self, recompute_storage=False, *args, **kwargs): self.clean() logger.info(f"Saving project {self}...")