diff --git a/supplychain/init.py b/supplychain/init.py index 1acb50d..75b0a46 100644 --- a/supplychain/init.py +++ b/supplychain/init.py @@ -483,7 +483,7 @@ async def delete_distribution_agreement_item(request, params_kw): async with db.sqlorContext(dbname) as sor: await sor.D("distribution_agreement_items", {"id": item_id}) # Also remove product_org_auth - async with DBPools().sqlorContext("sage") as sor_sage: + async with DBPools().sqlorContext(ServerEnv().get_module_dbname('sage')) as sor_sage: await sor_sage.sqlExe( "DELETE FROM product_org_auth WHERE auth_source_id = ${sid}$", {"sid": item_id}