From 7dbac3bfdbb03cd1df62494fd3eb3d64ef2b5315 Mon Sep 17 00:00:00 2001 From: yumoqing Date: Wed, 15 Jul 2026 14:02:25 +0800 Subject: [PATCH] fix: use env.get_module_dbname('sage') instead of hardcoded 'sage' --- discount/init.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/discount/init.py b/discount/init.py index c86fd9e..bd9eeb0 100644 --- a/discount/init.py +++ b/discount/init.py @@ -1138,7 +1138,7 @@ async def get_reseller_sales(request): userorgid = await env.get_userorgid() if not userorgid: return [] - async with DBPools().sqlorContext('sage') as sor: + async with DBPools().sqlorContext(env.get_module_dbname('sage')) as sor: rows = await sor.sqlExe( """SELECT DISTINCT u.id as sale_id, COALESCE(u.username, u.nick_name, u.id) as sale_name FROM users u