Skip to content

The open alternative to Salesforce, designed for AI.

refactor(server): drop logo select workaround in flat-application cache (#20708)

Charles Bochet35128490040e
diff --git a/packages/twenty-server/src/engine/core-modules/application/application.entity.ts b/packages/twenty-server/src/engine/core-modules/application/application.entity.ts
index c7ecd9b2813..c9c1ad8932b 100644
--- a/packages/twenty-server/src/engine/core-modules/application/application.entity.ts
+++ b/packages/twenty-server/src/engine/core-modules/application/application.entity.ts
@@ -19,6 +19,7 @@ import { ApplicationRegistrationEntity } from 'src/engine/core-modules/applicati
import { ApplicationRegistrationSourceType } from 'src/engine/core-modules/application/application-registration/enums/application-registration-source-type.enum';
import { FileEntity } from 'src/engine/core-modules/file/entities/file.entity';
import { ApplicationVariableEntity } from 'src/engine/core-modules/application/application-variable/application-variable.entity';
+import { WasIntroducedInUpgrade } from 'src/engine/core-modules/upgrade/decorators/was-introduced-in-upgrade.decorator';
import { AgentEntity } from 'src/engine/metadata-modules/ai/ai-agent/entities/agent.entity';
import { CommandMenuItemEntity } from 'src/engine/metadata-modules/command-menu-item/entities/command-menu-item.entity';
import { FrontComponentEntity } from 'src/engine/metadata-modules/front-component/entities/front-component.entity';
@@ -52,6 +53,10 @@ export class ApplicationEntity extends WorkspaceRelatedEntity {
description: string | null;
@Column({ nullable: true, type: 'text' })
+ @WasIntroducedInUpgrade({
+ upgradeCommandName:
+ '2.2.0_AddLogoToApplicationFastInstanceCommand_1777539664664',
+ })
logo: string | null;
// TODO should not be nullable
diff --git a/packages/twenty-server/src/engine/core-modules/application/workspace-flat-application-map-cache.service.ts b/packages/twenty-server/src/engine/core-modules/application/workspace-flat-application-map-cache.service.ts
index 4d672bb9c78..13953d9c17d 100644
--- a/packages/twenty-server/src/engine/core-modules/application/workspace-flat-application-map-cache.service.ts
+++ b/packages/twenty-server/src/engine/core-modules/application/workspace-flat-application-map-cache.service.ts
@@ -1,7 +1,7 @@
import { Injectable } from '@nestjs/common';
import { InjectRepository } from '@nestjs/typeorm';
-import { type FindOptionsSelect, Repository } from 'typeorm';
+import { Repository } from 'typeorm';
import { WorkspaceCacheProvider } from 'src/engine/workspace-cache/interfaces/workspace-cache-provider.service';
@@ -27,30 +27,6 @@ export class WorkspaceFlatApplicationMapCacheService extends WorkspaceCacheProvi
where: {
workspaceId,
},
- select: {
- id: true,
- universalIdentifier: true,
- name: true,
- description: true,
- version: true,
- sourceType: true,
- sourcePath: true,
- packageJsonChecksum: true,
- packageJsonFileId: true,
- yarnLockChecksum: true,
- yarnLockFileId: true,
- availablePackages: true,
- logicFunctionLayerId: true,
- defaultRoleId: true,
- settingsCustomTabFrontComponentId: true,
- canBeUninstalled: true,
- isSdkLayerStale: true,
- applicationRegistrationId: true,
- workspaceId: true,
- createdAt: true,
- updatedAt: true,
- deletedAt: true,
- } as unknown as FindOptionsSelect<ApplicationEntity>,
withDeleted: true,
});