This commit is contained in:
wuaho 2021-08-23 11:41:37 +08:00
parent ec3121f6b5
commit 3942ae17ae

View File

@ -93,7 +93,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('sorted', 999))
reports = sorted(reports, key=lambda x: x.get('show_config', {}).get('sort',999))
return schemas.Msg(code=0, msg='ok', data=reports)