From e30e79ab9df0f0f3dde29ebd845426af406ebdd4 Mon Sep 17 00:00:00 2001 From: Thomas Steen Rasmussen Date: Sun, 10 Nov 2024 17:10:11 +0100 Subject: [PATCH] update_fields not just fields! --- src/jobs/api.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/jobs/api.py b/src/jobs/api.py index f32a20a..9600616 100644 --- a/src/jobs/api.py +++ b/src/jobs/api.py @@ -191,7 +191,7 @@ def upload_result( elif job.job_type == "ImageExifExtractionJob": exif = json.load(f) basefile.exif = exif - basefile.save(fields=["exif", "updated"]) + basefile.save(update_fields=["exif", "updated"]) else: logger.debug(f"Unsupported job type: {job.job_type}") return 500, {"message": "Unsupported job type"} @@ -201,7 +201,7 @@ def upload_result( job.client_uuid = client.client_uuid job.client_version = client.client_version job.finished = True - job.save(fields=["user", "client_uuid", "client_version", "finished"]) + job.save(update_fields=["user", "client_uuid", "client_version", "finished"]) # refresh basefile to get updated jobcount basefile.refresh_from_db()