fix: sor.I takes 1 arg (data), not 2
This commit is contained in:
parent
fa5a1a3a8e
commit
37c39a053f
@ -32,7 +32,7 @@ if not data.get('contract_code'):
|
|||||||
try:
|
try:
|
||||||
db = DBPools()
|
db = DBPools()
|
||||||
async with db.sqlorContext(dbname) as sor:
|
async with db.sqlorContext(dbname) as sor:
|
||||||
await sor.I('supply_contracts', data)
|
await sor.I(data)
|
||||||
return json.dumps({'widgettype':'Message','options':{'title':'Success','message':'供应合同创建成功'}}, ensure_ascii=False)
|
return json.dumps({'widgettype':'Message','options':{'title':'Success','message':'供应合同创建成功'}}, ensure_ascii=False)
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
return json.dumps({'widgettype':'Error','options':{'title':'Error','message':f'创建失败: {e}'}}, ensure_ascii=False)
|
return json.dumps({'widgettype':'Error','options':{'title':'Error','message':f'创建失败: {e}'}}, ensure_ascii=False)
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user