Skip to content

Commit

Permalink
Merge branch 'bug-fix_order_of_ages' into dev
Browse files Browse the repository at this point in the history
  • Loading branch information
EliorGigi committed Jan 1, 2024
2 parents 9404046 + 6c3e1ee commit d062a15
Showing 1 changed file with 6 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,12 @@ def defaultdict_int_factory() -> Callable:
return lambda: defaultdict(int)

dict_grouped = defaultdict(defaultdict_int_factory())
# initialize the dict for fixed order of the ranges
for item_min_range, item_max_range in AGE_RANGE_DICT.items():
for injury_id in InjurySeverity.codes():
string_age_range = f"{item_min_range:02}-{item_max_range:02}"
dict_grouped[string_age_range][injury_id] = 0

has_data = False
for row in query:
has_data = True
Expand Down

0 comments on commit d062a15

Please sign in to comment.