sbt-idp/cope2n-api/fwd_api/utils/report.py
2024-02-23 15:50:52 +07:00

7 lines
251 B
Python

CAT_VALUES = {
"ALL": "ZZZZZZZZ",
"SEAO": "ZZ"
}
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