Skip to content

Commit 3276fdb

Browse files
authored
Do not bother to make updates if the update is falsey for atlas (#497)
1 parent f9991a9 commit 3276fdb

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/murfey/server/ispyb.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -120,9 +120,9 @@ def do_update_atlas(
120120
try:
121121
with Session() as db:
122122
atlas = db.query(Atlas).filter(Atlas.atlasId == atlas_id).one()
123-
atlas.atlasImage = atlas_image
124-
atlas.pixelSize = pixel_size
125-
atlas.cassetteSlot = slot
123+
atlas.atlasImage = atlas_image or atlas.atlasImage
124+
atlas.pixelSize = pixel_size or atlas.pixelSize
125+
atlas.cassetteSlot = slot or atlas.cassetteSlot
126126
db.add(atlas)
127127
db.commit()
128128
return {"success": True, "return_value": atlas.atlasId}

0 commit comments

Comments
 (0)