From b0d4be82952743b0dcf8076b58bbc9ef1ef1b169 Mon Sep 17 00:00:00 2001 From: Marcel Kocisek Date: Wed, 30 Oct 2024 15:29:13 +0100 Subject: [PATCH] Use . noation for ProjectFile class instead dict getter (#315) --- server/mergin/sync/commands.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) 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")