Skip to content

Commit b187b78

Browse files
committed
dialog exec
1 parent 2707841 commit b187b78

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

Mergin/projects_manager.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929

3030
from .mergin.merginproject import MerginProject
3131
from .project_status_dialog import ProjectStatusDialog
32-
32+
from .project_limit_hit_dialog import ProjectLimitHitDialog
3333

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

0 commit comments

Comments
 (0)