The open alternative to Salesforce, designed for AI.
TypeScript crmcrm-systemcustomergood-first-issuegraphqlhacktoberfestjavascriptmarketingmonoreponestjsopen-sourcepostgresqlreactreactjssalestypescriptweb
Fix app deletion missing cache invalidation (#14944)
Weiko9aaed28dcf3b
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.tsindex 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<ApplicationEntity>,+ private readonly flatEntityMapsCacheService: WorkspaceManyOrAllFlatEntityMapsCacheService,) {}async findById(id: string): Promise<ApplicationEntity | null> {@@ -86,5 +88,9 @@ export class ApplicationService {universalIdentifier,workspaceId,});++ await this.flatEntityMapsCacheService.invalidateFlatEntityMaps({+ workspaceId,+ });}}