From 6dc8be6f3174663fd7bf631ddf482231e54d6c72 Mon Sep 17 00:00:00 2001 From: wuaho Date: Tue, 12 Oct 2021 14:25:00 +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 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)