Skip to content

Commit 548e8cb

Browse files
committed
Change grid square tags when moving atlas to dc
1 parent 0599615 commit 548e8cb

1 file changed

Lines changed: 7 additions & 0 deletions

File tree

src/murfey/server/api/workflow.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -232,6 +232,7 @@ def register_dc_group(
232232
)
233233
).all():
234234
# Case where we switch from atlas to processing
235+
original_tag = dcg_murfey[0].tag
235236
dcg_murfey[0].tag = dcg_params.tag or dcg_murfey[0].tag
236237
if _transport_object:
237238
_transport_object.send(
@@ -243,6 +244,12 @@ def register_dc_group(
243244
},
244245
)
245246
db.add(dcg_murfey[0])
247+
for grid_square in db.exec(
248+
select(GridSquare)
249+
.where(GridSquare.tag == original_tag)
250+
.where(GridSquare.session_id == session_id)
251+
).all():
252+
grid_square.tag = dcg_params.tag or original_tag
246253
db.commit()
247254
else:
248255
dcg_parameters = {

0 commit comments

Comments
 (0)