We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 8ac86fd commit d6942d5Copy full SHA for d6942d5
1 file changed
mergin/merginproject.py
@@ -182,7 +182,16 @@ def workspace_id(self) -> int:
182
"""Returns ID of the workspace where the project belongs"""
183
# unfortunately we currently do not have information about workspace ID
184
# in project's metadata...
185
- raise NotImplementedError
+ if self._metadata is None:
186
+ self._read_metadata()
187
+
188
+ # "workspace_id" does not exist in projects downloaded with old client version
189
+ if self.is_old_metadata:
190
+ raise ClientError(
191
+ "The project directory has been created with an old version of the Mergin Maps client. "
192
+ "Please delete the project directory and re-download the project."
193
+ )
194
+ return self._metadata["workspace_id"]
195
196
def version(self) -> str:
197
"""Returns project version (e.g. "v123")"""
0 commit comments