Skip to content

Commit 8a4e490

Browse files
committed
if the smartem atlas exists, don't add it again
1 parent c5aab13 commit 8a4e490

1 file changed

Lines changed: 8 additions & 0 deletions

File tree

src/murfey/server/api/session_control.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -406,6 +406,14 @@ def register_atlas(
406406
grid_uuid = grid.uuid
407407
break
408408
if grid_uuid is not None:
409+
existing_atlas = smartem_client.get_grid_atlas(grid_uuid)
410+
if (
411+
existing_atlas.name == atlas_registration_data.name
412+
and existing_atlas.storage_folder
413+
== atlas_registration_data.storage_folder
414+
):
415+
# there is a question here of whether the grid should be registered if specified
416+
return
409417
atlas_data = AtlasData(
410418
id=atlas_registration_data.name,
411419
acquisition_date=datetime.now(),

0 commit comments

Comments
 (0)