fix: create_org兜底orgname为空时用id填充
This commit is contained in:
parent
cf4283ff0d
commit
5d9292c6f6
@ -55,6 +55,8 @@ async def sor_get_org_users(sor, orgid):
|
|||||||
return []
|
return []
|
||||||
|
|
||||||
async def create_org(sor, ns, orgtypes=[]):
|
async def create_org(sor, ns, orgtypes=[]):
|
||||||
|
if not ns.get('orgname'):
|
||||||
|
ns.orgname = ns.id # fallback: use id as orgname
|
||||||
await sor.C('organization', ns)
|
await sor.C('organization', ns)
|
||||||
if orgtypes == []:
|
if orgtypes == []:
|
||||||
orgtypes = ['customer']
|
orgtypes = ['customer']
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user