From a566f5534468e9a10b504e5a988f604bc0a1d77f Mon Sep 17 00:00:00 2001 From: Daniel Hatton Date: Fri, 14 Feb 2025 17:56:44 +0000 Subject: [PATCH] Do not bother to make updates if the update is falsey for atlas --- src/murfey/server/ispyb.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/murfey/server/ispyb.py b/src/murfey/server/ispyb.py index 2891041b8..be0536a9f 100644 --- a/src/murfey/server/ispyb.py +++ b/src/murfey/server/ispyb.py @@ -120,9 +120,9 @@ def do_update_atlas( try: with Session() as db: atlas = db.query(Atlas).filter(Atlas.atlasId == atlas_id).one() - atlas.atlasImage = atlas_image - atlas.pixelSize = pixel_size - atlas.cassetteSlot = slot + atlas.atlasImage = atlas_image or atlas.atlasImage + atlas.pixelSize = pixel_size or atlas.pixelSize + atlas.cassetteSlot = slot or atlas.cassetteSlot db.add(atlas) db.commit() return {"success": True, "return_value": atlas.atlasId}