fix: create_org兜底orgname为空时用id填充

This commit is contained in:
yumoqing 2026-07-14 12:03:50 +08:00
parent cf4283ff0d
commit 5d9292c6f6

View File

@ -55,6 +55,8 @@ async def sor_get_org_users(sor, orgid):
return []
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)
if orgtypes == []:
orgtypes = ['customer']