update
This commit is contained in:
parent
d2ab33b1a9
commit
a2d08b35e9
@ -66,9 +66,11 @@ async def read_report(
|
|||||||
|
|
||||||
for item in reports:
|
for item in reports:
|
||||||
item['added'] = False
|
item['added'] = False
|
||||||
added_ids = [item['report_id'] for item in dashboard.get('reports', [])]
|
item['show_config'] = dict()
|
||||||
|
added_ids = {item['report_id']: item for item in dashboard.get('reports', [])}
|
||||||
if item['_id'] in added_ids:
|
if item['_id'] in added_ids:
|
||||||
item['added'] = True
|
item['added'] = True
|
||||||
|
item['show_config'] = added_ids[item['_id']]
|
||||||
|
|
||||||
return schemas.Msg(code=0, msg='ok', data=reports)
|
return schemas.Msg(code=0, msg='ok', data=reports)
|
||||||
|
|
||||||
|
@ -44,6 +44,7 @@ class Report(BaseModel):
|
|||||||
report_id: str
|
report_id: str
|
||||||
graph_type: str
|
graph_type: str
|
||||||
model: str
|
model: str
|
||||||
|
graph_size: str
|
||||||
|
|
||||||
|
|
||||||
class AddReport(DBBase):
|
class AddReport(DBBase):
|
||||||
|
Loading…
Reference in New Issue
Block a user