sbt-idp/cope2n-api/fwd_api/utils/report.py

7 lines
251 B
Python
Raw Normal View History

2024-02-22 20:58:10 +00:00
CAT_VALUES = {
"ALL": "ZZZZZZZZ",
2024-02-23 08:50:52 +00:00
"SEAO": "ZZ"
2024-02-22 20:58:10 +00:00
}
def aggregate_overview(overview_list):
overview_list = sorted(overview_list, key=lambda x: x["extraction_date"] + CAT_VALUES.get(x["subs"], x["subs"]), reverse=True)
return overview_list