diff --git a/bmds_ui/desktop/components/database_form.py b/bmds_ui/desktop/components/database_form.py index ec8ab9ef..0c6756db 100644 --- a/bmds_ui/desktop/components/database_form.py +++ b/bmds_ui/desktop/components/database_form.py @@ -171,7 +171,7 @@ async def create_db(self) -> None: config.add_db(db) Config.sync() create_django_db(config, db) - self.dismiss(True) + self.app.call_from_thread(self.dismiss, result=True) async def on_worker_state_changed(self, message: Worker.StateChanged): # ensure loading indicator is removed when finished