This commit is contained in:
wuaho 2021-10-12 14:25:00 +08:00
parent 41810c868e
commit 6dc8be6f31

View File

@ -94,7 +94,7 @@ async def read_report(
if item['_id'] in added_ids:
item['added'] = True
item['show_config'] = added_ids[item['_id']]
reports = sorted(reports, key=lambda x: x.get('show_config', {'sort': 999}).get('sort', 999))
reports = sorted(reports, key=lambda x: x.get('show_config', {'sort': 999}).get('sort', 999) or 999)
return schemas.Msg(code=0, msg='ok', data=reports)