From a3fd6cf1941dd4302863d10dbaadb3d293318ff8 Mon Sep 17 00:00:00 2001 From: yumoqing Date: Thu, 9 Jul 2026 12:23:33 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E7=A7=9F=E6=88=B7=E5=93=81=E7=89=8C?= =?UTF-8?q?=E5=90=8D=E6=94=B9=E7=94=A8brand=5Fname=E5=AD=97=E6=AE=B5?= =?UTF-8?q?=EF=BC=8C=E4=B8=8D=E4=BB=8Eorgname=E5=8F=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- wwwroot/tenant_brand_data.dspy | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/wwwroot/tenant_brand_data.dspy b/wwwroot/tenant_brand_data.dspy index 33794f3e..097798d2 100644 --- a/wwwroot/tenant_brand_data.dspy +++ b/wwwroot/tenant_brand_data.dspy @@ -2,10 +2,10 @@ userorgid = await get_userorgid() env = request._run_ns 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 - 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 '' -result = json.dumps({"orgname": orgname, "iconid": iconid}, ensure_ascii=False) +result = json.dumps({"orgname": display_name, "iconid": iconid}, ensure_ascii=False) return result