Skip to content

Commit fd2e21b

Browse files
committed
accept limits also when creating projects
1 parent 33aee30 commit fd2e21b

File tree

1 file changed

+13
-10
lines changed

1 file changed

+13
-10
lines changed

Mergin/projects_manager.py

Lines changed: 13 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -191,19 +191,22 @@ def create_project(self, project_name, project_dir, is_public, namespace):
191191
)
192192
return True
193193

194-
dlg = SyncDialog()
195-
dlg.labelStatus.setText("Starting project upload...")
196-
dlg.push_start(self.mc, project_dir, full_project_name)
194+
has_changes = True
195+
while has_changes:
196+
dlg = SyncDialog()
197+
dlg.labelStatus.setText("Starting project upload...")
198+
dlg.push_start(self.mc, project_dir, full_project_name)
197199

198-
dlg.exec() # blocks until success, failure or cancellation
200+
dlg.exec() # blocks until success, failure or cancellation
199201

200-
if dlg.exception:
201-
push_error_message(dlg, project_name, self.plugin, self.mc)
202-
return True
202+
if dlg.exception:
203+
push_error_message(dlg, project_name, self.plugin, self.mc)
204+
return True
203205

204-
if not dlg.is_complete:
205-
# we were cancelled - but no need to show a message box about that...?
206-
return True
206+
if not dlg.is_complete:
207+
# we were cancelled - but no need to show a message box about that...?
208+
return True
209+
_, has_changes = get_push_changes_batch(self.mc, project_dir)
207210

208211
settings = QSettings()
209212
server_url = self.mc.url.rstrip("/")

0 commit comments

Comments
 (0)