From 06f809fc32cd0f550359f61764758c47a78caad9 Mon Sep 17 00:00:00 2001 From: yumoqing Date: Thu, 9 Jul 2026 16:39:07 +0800 Subject: [PATCH] fix: use request._run_ns instead of ServerEnv() in create_sub_reseller --- supplychain/init.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/supplychain/init.py b/supplychain/init.py index a9a401e..65ca844 100644 --- a/supplychain/init.py +++ b/supplychain/init.py @@ -313,7 +313,7 @@ async def delete_supply_contract_item(request, params_kw): async def create_sub_reseller(request, params_kw): """Create a new sub-reseller with orgid for discount/accounting.""" - env = ServerEnv() + env = request._run_ns user_id = await env.get_user() resellerid = await env.get_userorgid() data = params_kw