diff --git a/api/api_v1/endpoints/report.py b/api/api_v1/endpoints/report.py index ee89f60..9f03dc7 100644 --- a/api/api_v1/endpoints/report.py +++ b/api/api_v1/endpoints/report.py @@ -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)