Skip to content

Commit

Permalink
Do not throw when creating a project on inactive subscription
Browse files Browse the repository at this point in the history
  • Loading branch information
suricactus committed Aug 25, 2023
1 parent 5885c49 commit 4e26aba
Showing 1 changed file with 0 additions and 16 deletions.
16 changes: 0 additions & 16 deletions docker-app/qfieldcloud/core/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -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}...")
Expand Down

0 comments on commit 4e26aba

Please sign in to comment.