From 00e4a681c45c96e895d20bd56ee6ce2abf20abe8 Mon Sep 17 00:00:00 2001 From: Aditya Choudhari Date: Wed, 4 Dec 2024 12:04:55 -0800 Subject: [PATCH] fix: Add resource id check --- packages/job-dispatch/src/events/triggers/resource-deleted.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/packages/job-dispatch/src/events/triggers/resource-deleted.ts b/packages/job-dispatch/src/events/triggers/resource-deleted.ts index d592cbac..001089c8 100644 --- a/packages/job-dispatch/src/events/triggers/resource-deleted.ts +++ b/packages/job-dispatch/src/events/triggers/resource-deleted.ts @@ -38,6 +38,7 @@ export const getEventsForResourceDeleted = async ( where: and( SCHEMA.resourceMatchesMetadata(db, systemFilter), isNull(SCHEMA.resource.deletedAt), + eq(SCHEMA.resource.id, resource.id), ), }); if (matchedResource == null) return [];