diff --git a/packages/plugin-multi-tenant/src/hooks/afterTenantDelete.ts b/packages/plugin-multi-tenant/src/hooks/afterTenantDelete.ts index 4f43dbc5ae6..5443df75bc7 100644 --- a/packages/plugin-multi-tenant/src/hooks/afterTenantDelete.ts +++ b/packages/plugin-multi-tenant/src/hooks/afterTenantDelete.ts @@ -88,6 +88,7 @@ export const afterTenantDelete = cleanupPromises.push( req.payload.delete({ collection: slug, + req, where: { [tenantFieldName]: { in: [id], @@ -102,6 +103,7 @@ export const afterTenantDelete = collection: usersSlug, depth: 0, limit: 0, + req, where: { [`${usersTenantsArrayFieldName}.${usersTenantsArrayTenantFieldName}`]: { in: [id], @@ -123,6 +125,7 @@ export const afterTenantDelete = }, ), }, + req, }), ) })