From 1e8567fe2c6723b317f976cca8bc653d054c48d3 Mon Sep 17 00:00:00 2001 From: Matthew Munns Date: Tue, 2 Jul 2024 17:10:08 -0400 Subject: [PATCH] improve flaky test due to thread not finishing --- bmds_ui/desktop/components/database_form.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bmds_ui/desktop/components/database_form.py b/bmds_ui/desktop/components/database_form.py index f384d238..cc368688 100644 --- a/bmds_ui/desktop/components/database_form.py +++ b/bmds_ui/desktop/components/database_form.py @@ -164,7 +164,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