diff --git a/packages/apps/job-launcher/server/src/modules/encryption/encryption.module.ts b/packages/apps/job-launcher/server/src/modules/encryption/encryption.module.ts index 805c2e1d3c..7a1f74097f 100644 --- a/packages/apps/job-launcher/server/src/modules/encryption/encryption.module.ts +++ b/packages/apps/job-launcher/server/src/modules/encryption/encryption.module.ts @@ -7,7 +7,7 @@ import { ErrorEncryption } from '../../common/constants/errors'; const encryptionProvider: Provider = { provide: Encryption, useFactory: async (pgpConfigService: PGPConfigService) => { - if (!pgpConfigService.encrypt && !pgpConfigService.privateKey) { + if (!pgpConfigService.encrypt || !pgpConfigService.privateKey) { return null; } const privateKey = pgpConfigService.privateKey;