fix: bind_customer env=ServerEnv()→request._run_ns

This commit is contained in:
yumoqing 2026-07-06 15:11:34 +08:00
parent 34a2fecc99
commit 8b054f01d1

View File

@ -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()