Skip to content

Infisical is the open-source platform for securing secrets, certificates, access, and AI Agents.

read app connection from primary database as well

adilsond3247cc281db
diff --git a/backend/src/services/delegated-approval-decision/delegated-approval-decision-service.ts b/backend/src/services/delegated-approval-decision/delegated-approval-decision-service.ts
index 1bab4d3028..d99e9d815a 100644
--- a/backend/src/services/delegated-approval-decision/delegated-approval-decision-service.ts
+++ b/backend/src/services/delegated-approval-decision/delegated-approval-decision-service.ts
@@ -328,7 +328,10 @@ export const delegatedApprovalDecisionServiceFactory = ({
);
}
- const rawConnection = await appConnectionDAL.findById(delegatedPolicy.connectionId);
+ const rawConnection = await appConnectionDAL.findById(
+ delegatedPolicy.connectionId,
+ delegatedApprovalRequestDAL.primaryNode()
+ );
const postApprovalTxRoutine = isDelegatedApprovalSupportedPolicyType(approvalRequest.type)
? approvalResources[approvalRequest.type]?.postApprovalTxRoutine
: undefined;