diff --git a/api/src/modules/import-data/sourcing-data/sourcing-data-import.service.ts b/api/src/modules/import-data/sourcing-data/sourcing-data-import.service.ts index 7916ab527..3a23b297c 100644 --- a/api/src/modules/import-data/sourcing-data/sourcing-data-import.service.ts +++ b/api/src/modules/import-data/sourcing-data/sourcing-data-import.service.ts @@ -158,6 +158,7 @@ export class SourcingDataImportService { if (errors.length) { throw new GeoCodingError( 'Import failed. There are GeoCoding errors present in the file', + errors, ); } const warnings: string[] = []; diff --git a/api/src/modules/import-data/sourcing-data/validation/excel-validator.service.ts b/api/src/modules/import-data/sourcing-data/validation/excel-validator.service.ts index e24f6870a..efae6e508 100644 --- a/api/src/modules/import-data/sourcing-data/validation/excel-validator.service.ts +++ b/api/src/modules/import-data/sourcing-data/validation/excel-validator.service.ts @@ -95,7 +95,7 @@ export class ExcelValidatorService { } private setLineNumber(index: number, sheetName: SheetName): number { - return sheetName === 'sourcingData' ? index + 5 : index + 1; + return sheetName === 'sourcingData' ? index + 5 : index + 2; } private getProgressTracker(sheet: Sheet): ValidationProgressTracker { diff --git a/api/src/modules/import-data/sourcing-data/validation/validators/sourcing-data.sheet-validator.ts b/api/src/modules/import-data/sourcing-data/validation/validators/sourcing-data.sheet-validator.ts index 9d1e1ee16..4cfa33674 100644 --- a/api/src/modules/import-data/sourcing-data/validation/validators/sourcing-data.sheet-validator.ts +++ b/api/src/modules/import-data/sourcing-data/validation/validators/sourcing-data.sheet-validator.ts @@ -42,14 +42,11 @@ export class SourcingDataSheetValidator { @IsNotEmpty({ message: 'location type input is required', }) - @IsEnum( - Object.values(LOCATION_TYPES).map((s: string) => s.replace(/-/g, ' ')), - { - message: `Available columns for new location type: ${Object.values( - LOCATION_TYPES, - ).join(', ')}`, - }, - ) + @IsEnum(Object.values(LOCATION_TYPES), { + message: `Available columns for new location type: ${Object.values( + LOCATION_TYPES, + ).join(', ')}`, + }) 'location_type': LOCATION_TYPES; @IsNotEmpty({