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