Skip to content

Commit

Permalink
Enable the New Spine db button in freshly created Data stores
Browse files Browse the repository at this point in the history
Add Data store dialog was returning an empty URL dict instead of
None which caused Data Store to disable the New Spine db button.
The dialog should return None as the URL so Data stores can
use their default initial URL which sets dialog to "sqlite"
enabling the button.
  • Loading branch information
soininen committed Nov 1, 2024
1 parent e4fcd2c commit 3b170a5
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion spine_items/data_store/data_store.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ def __init__(self, name, description, x, y, toolbox, project, url):
except OSError:
self._logger.msg_error.emit(f"[OSError] Creating directory {self.logs_dir} failed. Check permissions.")
if url is None:
url = {}
url = {"dialect": "sqlite"}
self._url = self.parse_url(url)
self._url_validated = False
self._resource_to_replace = None
Expand Down
2 changes: 1 addition & 1 deletion spine_items/data_store/widgets/add_data_store_widget.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ def call_add_item(self):
"description": self.description,
"x": self._x,
"y": self._y,
"url": {},
"url": None,
}
}
self._toolbox.add_project_items(item)

0 comments on commit 3b170a5

Please sign in to comment.