From 3652727a5b99d625fcadd3a45fe29d27ae7a3375 Mon Sep 17 00:00:00 2001 From: Muhsin Shah Date: Thu, 4 Jul 2024 19:15:27 +0530 Subject: [PATCH] Added DeepPartial instead of QueryDeepPartialEntity to avoid the type error --- server/src/services/app_import_export.service.ts | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/server/src/services/app_import_export.service.ts b/server/src/services/app_import_export.service.ts index 4a2b9b5f5c..50c29d9b10 100644 --- a/server/src/services/app_import_export.service.ts +++ b/server/src/services/app_import_export.service.ts @@ -9,7 +9,7 @@ import { DataSource } from 'src/entities/data_source.entity'; import { DataSourceOptions } from 'src/entities/data_source_options.entity'; import { GroupPermission } from 'src/entities/group_permission.entity'; import { User } from 'src/entities/user.entity'; -import { EntityManager, In } from 'typeorm'; +import { DeepPartial, EntityManager, In } from 'typeorm'; import { DataSourcesService } from './data_sources.service'; import { defaultAppEnvironments, @@ -463,7 +463,7 @@ export class AppImportExportService { if (!isNormalizedAppDefinitionSchema) { for (const importingAppVersion of importingAppVersions) { - const updatedDefinition:any = this.replaceDataQueryIdWithinDefinitions( + const updatedDefinition: DeepPartial = this.replaceDataQueryIdWithinDefinitions( importingAppVersion.definition, appResourceMappings.dataQueryMapping ); @@ -1421,7 +1421,8 @@ export class AppImportExportService { } replaceDataQueryIdWithinDefinitions( - definition: any, + /* TODO: we need more accurate entity / type for definition instead of using partials or any */ + definition: DeepPartial, dataQueryMapping: Record ): QueryDeepPartialEntity { if (definition?.pages) {