Skip to content

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

feat(server): fixed if projectid is missing

Akhil Mohanfa18ca41ace0
diff --git a/backend/src/ee/services/audit-log/audit-log-queue.ts b/backend/src/ee/services/audit-log/audit-log-queue.ts
index 1bf56ca3b8..09083eabf0 100644
--- a/backend/src/ee/services/audit-log/audit-log-queue.ts
+++ b/backend/src/ee/services/audit-log/audit-log-queue.ts
@@ -71,7 +71,7 @@ export const auditLogQueueServiceFactory = ({
userAgentType
});
- const logStreams = await auditLogStreamDAL.find({ projectId });
+ const logStreams = projectId ? await auditLogStreamDAL.find({ projectId }) : [];
await Promise.allSettled(
logStreams.map(
async ({ url, encryptedTokenTag, encryptedTokenIV, encryptedTokenKeyEncoding, encryptedTokenCiphertext }) => {