update
This commit is contained in:
parent
dac9cea1b5
commit
1086d69419
@ -61,6 +61,15 @@ async def model_management_add(ns={}):
|
||||
await sor.rollback()
|
||||
return {'status': False, 'msg': 'create model failed, missing model id'}
|
||||
|
||||
# 未传 sort_order 时,默认与新建主键 id 相同
|
||||
if not (
|
||||
'sort_order' in ns
|
||||
and ns.get('sort_order') is not None
|
||||
and ns.get('sort_order') != ''
|
||||
):
|
||||
await sor.U('model_management', {'id': model_id, 'sort_order': model_id})
|
||||
model_dic['sort_order'] = model_id
|
||||
|
||||
result_data = dict(model_dic)
|
||||
result_data['id'] = model_id
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user