From 8b054f01d185c367a9fd7475a90022148b9fc23f Mon Sep 17 00:00:00 2001 From: yumoqing Date: Mon, 6 Jul 2026 15:11:34 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20bind=5Fcustomer=20env=3DServerEnv()?= =?UTF-8?q?=E2=86=92request.=5Frun=5Fns?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- discount/init.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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()