diff --git a/packages/twenty-server/src/engine/core-modules/application/application.service.ts b/packages/twenty-server/src/engine/core-modules/application/application.service.ts index b3fece99f30..ca737d88899 100644 --- a/packages/twenty-server/src/engine/core-modules/application/application.service.ts +++ b/packages/twenty-server/src/engine/core-modules/application/application.service.ts @@ -1,17 +1,19 @@ import { Injectable } from '@nestjs/common'; import { InjectRepository } from '@nestjs/typeorm'; -import { Repository } from 'typeorm'; import { isDefined } from 'twenty-shared/utils'; +import { Repository } from 'typeorm'; import { ApplicationEntity } from 'src/engine/core-modules/application/application.entity'; import { PackageJson } from 'src/engine/core-modules/application/types/application.types'; +import { WorkspaceManyOrAllFlatEntityMapsCacheService } from 'src/engine/core-modules/common/services/workspace-many-or-all-flat-entity-maps-cache.service'; @Injectable() export class ApplicationService { constructor( @InjectRepository(ApplicationEntity) private readonly applicationRepository: Repository, + private readonly flatEntityMapsCacheService: WorkspaceManyOrAllFlatEntityMapsCacheService, ) {} async findById(id: string): Promise { @@ -86,5 +88,9 @@ export class ApplicationService { universalIdentifier, workspaceId, }); + + await this.flatEntityMapsCacheService.invalidateFlatEntityMaps({ + workspaceId, + }); } }