main #114

Merged
charles merged 10 commits from main into prod 2026-05-27 18:03:45 +08:00
Showing only changes of commit 1086d69419 - Show all commits

View File

@ -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