fix: index.ui用db.sqlorContext()替代request._run_ns

This commit is contained in:
yumoqing 2026-07-09 12:02:54 +08:00
parent 33aa4a63bb
commit 09bf64378f

View File

@ -1,6 +1,5 @@
{% set userorgid = get_userorgid() %}
{% set env = request._run_ns %}
{% set sor = env.get_sor('sage') %}
{% set sor = db.sqlorContext() %}
{% set org = sor.execute_sql('SELECT orgname, iconid FROM organization WHERE id = ${orgid}$', {'orgid': userorgid}).first() %}
{% set orgname = org.orgname if org and org.orgname else 'OpenComputing' %}
{% set icon = org.iconid if org and org.iconid else 'imgs/ocai.svg' %}