diff --git a/server/mergin/sync/commands.py b/server/mergin/sync/commands.py index 327bc560..a07d5966 100644 --- a/server/mergin/sync/commands.py +++ b/server/mergin/sync/commands.py @@ -75,13 +75,13 @@ def download(project_name, version, directory): # pylint: disable=W0612 os.mkdir(directory) files = pv.files for f in files: - project.storage.restore_versioned_file(f["path"], version) - f_dir = os.path.dirname(f["path"]) + project.storage.restore_versioned_file(f.path, version) + f_dir = os.path.dirname(f.path) if f_dir: os.makedirs(os.path.join(directory, f_dir), exist_ok=True) shutil.copy( - os.path.join(project.storage.project_dir, f["location"]), - os.path.join(directory, f["path"]), + os.path.join(project.storage.project_dir, f.location), + os.path.join(directory, f.path), ) print("Project downloaded successfully")