解决报表排序bug
This commit is contained in:
parent
94091e48ec
commit
cd38df987a
@ -96,7 +96,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', {}).get('sort',999))
|
||||
reports = sorted(reports, key=lambda x: x.get('show_config', {}).get('sort',999) or 999)
|
||||
|
||||
return schemas.Msg(code=0, msg='ok', data=reports)
|
||||
|
||||
|
@ -35,7 +35,7 @@ class Report(BaseModel):
|
||||
ascending: bool = None
|
||||
model: str = None
|
||||
graph_size: str = None
|
||||
sort: int = None
|
||||
sort: int = 999
|
||||
modelswitch: bool = None
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user