From d1b7fd1f7d978e250c88c42372f12f8d7ef37a64 Mon Sep 17 00:00:00 2001 From: Yulia Belyakova Date: Thu, 3 Aug 2023 16:37:29 +0200 Subject: [PATCH] Save features uploaded from CSV as legacy --- .../geo-features/import/features-amounts-upload.service.ts | 1 + api/apps/api/test/upload-feature/upload-feature.fixtures.ts | 2 ++ 2 files changed, 3 insertions(+) diff --git a/api/apps/api/src/modules/geo-features/import/features-amounts-upload.service.ts b/api/apps/api/src/modules/geo-features/import/features-amounts-upload.service.ts index dc58a9a09a..776eaddca5 100644 --- a/api/apps/api/src/modules/geo-features/import/features-amounts-upload.service.ts +++ b/api/apps/api/src/modules/geo-features/import/features-amounts-upload.service.ts @@ -222,6 +222,7 @@ export class FeatureAmountUploadService { featureClassName: feature.feature_name, projectId: projectId, creationStatus: JobStatus.done, + isLegacy: true, }; }); diff --git a/api/apps/api/test/upload-feature/upload-feature.fixtures.ts b/api/apps/api/test/upload-feature/upload-feature.fixtures.ts index 23555a8622..5ca1fd0710 100644 --- a/api/apps/api/test/upload-feature/upload-feature.fixtures.ts +++ b/api/apps/api/test/upload-feature/upload-feature.fixtures.ts @@ -253,6 +253,8 @@ export const getFixtures = async () => { }); expect(newFeaturesAdded).toHaveLength(2); expect(newFeaturesAdded[0].projectId).toBe(projectId); + expect(newFeaturesAdded[0].isLegacy).toBe(true); + expect(newFeaturesAdded[1].isLegacy).toBe(true); }, ThenNewFeaturesAmountsAreCreated: async () => {