Skip to content

Commit

Permalink
fix project info obtaining using updated mergin-client api
Browse files Browse the repository at this point in the history
  • Loading branch information
Jan Caha committed Dec 8, 2023
1 parent 57bcc93 commit 82e07a9
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions dbsync.py
Original file line number Diff line number Diff line change
Expand Up @@ -754,12 +754,11 @@ def pull(conn_cfg, mc):
# Make sure that local project ID (if available) is the same as on the server
_validate_local_project_id(mp, mc)

project_path = mp.metadata["name"]
local_version = mp.metadata["version"]
local_version = mp.version()

try:
projects = mc.get_projects_by_names([project_path])
server_version = projects[project_path]["version"]
projects = mc.get_projects_by_names([mp.project_full_name()])
server_version = projects[mp.project_full_name()]["version"]
except ClientError as e:
# this could be e.g. DNS error
raise DbSyncError("Mergin Maps client error: " + str(e))
Expand Down

0 comments on commit 82e07a9

Please sign in to comment.