diff --git a/discount/init.py b/discount/init.py index 8af2475..c4aa527 100644 --- a/discount/init.py +++ b/discount/init.py @@ -623,7 +623,7 @@ async def bind_customer(request, params_kw): """Bind customer to reseller+sale via promo code (called during registration/login). First-time binding only. Update discounts if new ones are lower. params_kw may contain 'customerid' to override current user's orgid (for registration flow).""" - env = ServerEnv() + env = request._run_ns dbname = env.get_module_dbname('discount') config = getConfig() db = DBPools()