diff --git a/packages/core/src/organization-project/organization-project.subscriber.ts b/packages/core/src/organization-project/organization-project.subscriber.ts index cefb6119325..acc32e877a9 100644 --- a/packages/core/src/organization-project/organization-project.subscriber.ts +++ b/packages/core/src/organization-project/organization-project.subscriber.ts @@ -101,8 +101,7 @@ export class OrganizationProjectSubscriber extends BaseEntityEventSubscriber= 0) { // Common update logic for both ORMs if (em instanceof TypeOrmEntityManager) { - await em.query(updateQuery, [totalMembers, projectId]); + await em.query(updateQuery, [totalMembers, projectId, organizationId, tenantId]); } else if (em instanceof MikroOrmEntityManager) { // Replace $ placeholders with ? for MikroORM updateQuery = updateQuery.replace(/\$\d/g, '?'); - await em.getConnection().execute(updateQuery, [totalMembers, projectId]); + await em.getConnection().execute(updateQuery, [totalMembers, projectId, organizationId, tenantId]); } } } catch (error) { - console.error('OrganizationProjectSubscriber: An error occurred during the updateProjectMembersCount process:', error.message); + console.error('OrganizationProjectSubscriber: An error occurred during the updateProjectMembersCount process:', error); } } }