Skip to content

Commit

Permalink
fix: Add to failures if study data not available
Browse files Browse the repository at this point in the history
  • Loading branch information
karatugo committed Jun 14, 2024
1 parent 36ce6b9 commit 92d1724
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion sumstats_service/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -434,7 +434,7 @@ def task_failure_handler(sender=None, **kwargs) -> None:
config.MONGO_DB,
)
study_data = mdb.get_study(gcst_id=gcst_id)
if study_data.get("summaryStatisticsFile", "") != config.NR:
if not study_data or study_data.get("summaryStatisticsFile", "") != config.NR:
logger.info(f"Adding {gcst_id=} to the task failures collection")
mdb.insert_task_failure(gcst_id=gcst_id, exception=str(exception))
else:
Expand Down

0 comments on commit 92d1724

Please sign in to comment.