From 3942ae17ae13be7800455fd09863062cca60af18 Mon Sep 17 00:00:00 2001 From: wuaho Date: Mon, 23 Aug 2021 11:41:37 +0800 Subject: [PATCH] 1 --- api/api_v1/endpoints/report.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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)