1
This commit is contained in:
parent
15b4404c45
commit
0313fba151
@ -40,7 +40,7 @@ async def edit(
|
||||
"""编辑报表"""
|
||||
res = await crud.report.update_one(db, {'_id': data_in.report_id, 'user_id': request.user.id},
|
||||
{'$set': {'query': data_in.query, 'name': data_in.name, 'desc': data_in.desc}})
|
||||
if not res.modified_count:
|
||||
if not res.matched_count:
|
||||
return schemas.Msg(code=-1, msg='只能报表所有者编辑')
|
||||
return schemas.Msg(code=0, msg='ok', data='编辑成功')
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user