diff --git a/api/api_v1/endpoints/report.py b/api/api_v1/endpoints/report.py index 6df6124..40bcd3d 100644 --- a/api/api_v1/endpoints/report.py +++ b/api/api_v1/endpoints/report.py @@ -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)