feat: 租户品牌名改用brand_name字段,不从orgname取
This commit is contained in:
parent
81ed08ebe7
commit
a3fd6cf194
@ -2,10 +2,10 @@
|
|||||||
userorgid = await get_userorgid()
|
userorgid = await get_userorgid()
|
||||||
env = request._run_ns
|
env = request._run_ns
|
||||||
async with get_sor_context(env, 'sage') as sor:
|
async with get_sor_context(env, 'sage') as sor:
|
||||||
orgs = await sor.sqlExe('SELECT orgname, iconid FROM organization WHERE id = ${orgid}$', {'orgid': userorgid})
|
orgs = await sor.sqlExe('SELECT orgname, iconid, brand_name FROM organization WHERE id = ${orgid}$', {'orgid': userorgid})
|
||||||
org = orgs[0] if orgs else None
|
org = orgs[0] if orgs else None
|
||||||
orgname = org.orgname if org and org.orgname else 'OpenComputing'
|
display_name = org.brand_name if org and org.brand_name else (org.orgname if org and org.orgname else 'OpenComputing')
|
||||||
iconid = org.iconid if org and org.iconid else ''
|
iconid = org.iconid if org and org.iconid else ''
|
||||||
|
|
||||||
result = json.dumps({"orgname": orgname, "iconid": iconid}, ensure_ascii=False)
|
result = json.dumps({"orgname": display_name, "iconid": iconid}, ensure_ascii=False)
|
||||||
return result
|
return result
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user