Skip to content

Commit 3abe4f6

Browse files
committed
Fixed bug with grid square registration not running if the CLEM atlas is the last dataset to be registered
1 parent 406d510 commit 3abe4f6

File tree

2 files changed

+7
-8
lines changed

2 files changed

+7
-8
lines changed

src/murfey/workflows/clem/register_preprocessing_results.py

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -501,13 +501,12 @@ def run(message: dict, murfey_db: Session, demo: bool = False) -> dict[str, bool
501501
)
502502

503503
try:
504-
# Register dataset as grid square
505-
if "Overview_" not in result.series_name:
506-
_register_grid_square(
507-
session_id=session_id,
508-
result=result,
509-
murfey_db=murfey_db,
510-
)
504+
# Register CLEM image series as grid squares
505+
_register_grid_square(
506+
session_id=session_id,
507+
result=result,
508+
murfey_db=murfey_db,
509+
)
511510
except Exception:
512511
# Log error but allow workflow to proceed
513512
logger.error(

tests/workflows/clem/test_register_preprocessing_results.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -160,7 +160,7 @@ def test_run(
160160
assert result == {"success": True}
161161
assert mock_register_clem_series.call_count == len(preprocessing_messages)
162162
assert mock_register_dcg_and_atlas.call_count == len(preprocessing_messages)
163-
assert mock_register_grid_square.call_count == len(preprocessing_messages) - 1
163+
assert mock_register_grid_square.call_count == len(preprocessing_messages)
164164
assert mock_align_and_merge_call.call_count == len(preprocessing_messages) * len(
165165
colors
166166
)

0 commit comments

Comments
 (0)