fix: use get_sor_context(rbac) to query suppliers in sage db

This commit is contained in:
yumoqing 2026-07-10 09:26:21 +08:00
parent 3ae70d2c92
commit f0d3550b63

View File

@ -1,8 +1,7 @@
result = [{'providerid': '', 'providerid_text': '全部'}] result = [{'providerid': '', 'providerid_text': '全部'}]
try: try:
dbname = get_module_dbname('supplychain') async with get_sor_context(request._run_ns, 'rbac') as sor:
async with DBPools().sqlorContext(dbname) as sor:
rows = await sor.sqlExe( rows = await sor.sqlExe(
"select id as providerid, supplier_name as providerid_text from suppliers where status = '1' order by supplier_name", "select id as providerid, supplier_name as providerid_text from suppliers where status = '1' order by supplier_name",
{} {}