Skip to content

Commit

Permalink
dialog exec
Browse files Browse the repository at this point in the history
  • Loading branch information
VitorVieiraZ committed Nov 11, 2024
1 parent 2707841 commit b187b78
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions Mergin/projects_manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@

from .mergin.merginproject import MerginProject
from .project_status_dialog import ProjectStatusDialog

from .project_limit_hit_dialog import ProjectLimitHitDialog

class MerginProjectsManager(object):
"""Class for managing Mergin Maps projects in QGIS."""
Expand Down Expand Up @@ -96,10 +96,10 @@ def create_project(self, project_name, project_dir, is_public, namespace):
if e.http_error == 409:
msg = f'Project named "{project_name}" already exists in the workspace "{namespace}".\nPlease try renaming the project.'
elif e.server_code == ErrorCode.ProjectsLimitHit.value:
msg = (
"Maximum number of projects reached. Please upgrade your subscription to create new projects.\n"
f"Projects quota: {e.server_response['projects_quota']}"
)
print(e.server_response)
dlg = ProjectLimitHitDialog(e)
dlg.exec()
return False
elif e.server_code == ErrorCode.StorageLimitHit.value:
msg = (
f"{e.detail}\nCurrent limit: {bytes_to_human_size(dlg.exception.server_response['storage_limit'])}"
Expand Down

0 comments on commit b187b78

Please sign in to comment.