diff --git a/backend/src/services/secret-v2-bridge/secret-v2-bridge-fns.ts b/backend/src/services/secret-v2-bridge/secret-v2-bridge-fns.ts index 8e1de2d91..0abf02aaa 100644 --- a/backend/src/services/secret-v2-bridge/secret-v2-bridge-fns.ts +++ b/backend/src/services/secret-v2-bridge/secret-v2-bridge-fns.ts @@ -94,7 +94,7 @@ export const fnSecretBulkInsert = async ({ ); const userActorId = actor && actor.type === ActorType.USER ? actor.actorId : undefined; - const identityActorId = actor && actor.type !== ActorType.USER ? actor.actorId : undefined; + const identityActorId = actor && actor.type === ActorType.IDENTITY ? actor.actorId : undefined; const actorType = actor?.type || ActorType.PLATFORM; const newSecrets = await secretDAL.insertMany( @@ -182,7 +182,7 @@ export const fnSecretBulkUpdate = async ({ actor }: TFnSecretBulkUpdate) => { const userActorId = actor && actor?.type === ActorType.USER ? actor?.actorId : undefined; - const identityActorId = actor && actor?.type !== ActorType.USER ? actor?.actorId : undefined; + const identityActorId = actor && actor?.type === ActorType.IDENTITY ? actor?.actorId : undefined; const actorType = actor?.type || ActorType.PLATFORM; const sanitizedInputSecrets = inputSecrets.map(