Skip to content

Commit

Permalink
add try catch
Browse files Browse the repository at this point in the history
  • Loading branch information
mshadbolt committed Mar 8, 2024
1 parent cd22b9b commit d2d5a03
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions query_server/query_operations.py
Original file line number Diff line number Diff line change
Expand Up @@ -95,8 +95,12 @@ def get_summary_stats(donors, headers):
treatment_type_count = {}
for treatment in treatments:
if treatment["submitter_donor_id"] in donors_by_id:
for treatment_type in treatment["treatment_type"]:
add_or_increment(treatment_type_count, treatment_type)
try:
for treatment_type in treatment["treatment_type"]:
add_or_increment(treatment_type_count, treatment_type)
except TypeError as e:
print(e)
pass

return {
'age_at_diagnosis': age_at_diagnosis,
Expand Down

0 comments on commit d2d5a03

Please sign in to comment.