diff --git a/Mergin/projects_manager.py b/Mergin/projects_manager.py index 4c7ca696..c4243592 100644 --- a/Mergin/projects_manager.py +++ b/Mergin/projects_manager.py @@ -249,7 +249,10 @@ def project_status(self, project_dir): if not self.check_project_server(project_dir): return try: - AuthSync().export_auth(self.mc) + # Skip when the synced project isn't open in QGIS: AuthSync init would fail. + qgis_proj_filename = os.path.normpath(QgsProject.instance().fileName()) + if qgis_proj_filename in find_qgis_files(project_dir): + AuthSync().export_auth(self.mc) pull_changes, push_changes, push_changes_summary = self.mc.project_status(project_dir) dlg = ProjectStatusDialog( pull_changes,