11
This commit is contained in:
parent
4bc131a82c
commit
b7462dd376
@ -162,7 +162,7 @@ async def edit_report(data_in: schemas.EditReport,
|
|||||||
"""编辑报表"""
|
"""编辑报表"""
|
||||||
|
|
||||||
res = await crud.dashboard.update_one(db, {'_id': data_in.id, 'reports.report_id': data_in.report.report_id},
|
res = await crud.dashboard.update_one(db, {'_id': data_in.id, 'reports.report_id': data_in.report.report_id},
|
||||||
{'$set': {'reports.$': data_in.report.dict()}})
|
{'$set': {'reports.$': data_in.report.dict(skip_defaults=True)}})
|
||||||
|
|
||||||
return schemas.Msg(code=0, msg='ok', data='ok')
|
return schemas.Msg(code=0, msg='ok', data='ok')
|
||||||
|
|
||||||
|
@ -81,6 +81,7 @@ class Settings(BaseSettings):
|
|||||||
'max': lambda x: func.max(x),
|
'max': lambda x: func.max(x),
|
||||||
'min': lambda x: func.min(x),
|
'min': lambda x: func.min(x),
|
||||||
'distinct_count': lambda x: func.uniqCombined(x),
|
'distinct_count': lambda x: func.uniqCombined(x),
|
||||||
|
'uniqCombined': lambda x: func.uniqCombined(x),
|
||||||
}
|
}
|
||||||
|
|
||||||
CK_OPERATOR = {
|
CK_OPERATOR = {
|
||||||
|
@ -35,7 +35,7 @@ class Report(BaseModel):
|
|||||||
ascending: bool = None
|
ascending: bool = None
|
||||||
model: str = None
|
model: str = None
|
||||||
graph_size: str = None
|
graph_size: str = None
|
||||||
sort: int = 999
|
sort: int = None
|
||||||
modelswitch: bool = None
|
modelswitch: bool = None
|
||||||
avesumdata: bool = True
|
avesumdata: bool = True
|
||||||
daydata: bool = True
|
daydata: bool = True
|
||||||
|
Loading…
Reference in New Issue
Block a user