diff --git a/api/src/services/import-services/marking/import-markings-strategy.ts b/api/src/services/import-services/marking/import-markings-strategy.ts index 2ae8946eba..7424c4557e 100644 --- a/api/src/services/import-services/marking/import-markings-strategy.ts +++ b/api/src/services/import-services/marking/import-markings-strategy.ts @@ -114,7 +114,6 @@ export class ImportMarkingsStrategy extends DBService implements CSVImportStrate const rowsToValidate: Partial[] = []; for (const row of rows) { - console.log(JSON.stringify(row, null, 2)); let critterId, captureId; const alias = getColumnCell(row, 'ALIAS'); @@ -124,16 +123,10 @@ export class ImportMarkingsStrategy extends DBService implements CSVImportStrate const captureDate = getColumnCell(row, 'CAPTURE_DATE'); const captureTime = getColumnCell(row, 'CAPTURE_TIME'); - console.log(JSON.stringify(captureDate, null, 2)); - console.log(JSON.stringify(captureTime, null, 2)); const critter = critterAliasMap.get(alias.cell.toLowerCase()); if (critter) { - console.log(JSON.stringify(critter?.captures, null, 2)); - console.log(JSON.stringify(captureDate.cell, null, 2)); - console.log(JSON.stringify(captureTime.cell, null, 2)); // Find the capture_id from the date time columns const captures = findCapturesFromDateTime(critter.captures, captureDate.cell, captureTime.cell); - console.log(JSON.stringify(captures, null, 2)); captureId = captures.length === 1 ? captures[0].capture_id : undefined; critterId = critter.critter_id; rowCritters.push(critter); diff --git a/api/src/services/import-services/measurement/import-measurements-strategy.ts b/api/src/services/import-services/measurement/import-measurements-strategy.ts index d39e69f86c..d75042a642 100644 --- a/api/src/services/import-services/measurement/import-measurements-strategy.ts +++ b/api/src/services/import-services/measurement/import-measurements-strategy.ts @@ -115,19 +115,27 @@ export class ImportMeasurementsStrategy extends DBService implements CSVImportSt row: Row, critterAliasMap: Map ): { capture_id?: string; critter_id?: string; tsn?: string } { + console.log(JSON.stringify(row, null, 2)); const getColumnCell = generateColumnCellGetterFromColumnValidator(this.columnValidator); const alias = getColumnCell(row, 'ALIAS'); const captureDate = getColumnCell(row, 'CAPTURE_DATE'); const captureTime = getColumnCell(row, 'CAPTURE_TIME'); + console.log(JSON.stringify(captureDate, null, 2)); + console.log(JSON.stringify(captureTime, null, 2)); + let capture_id, critter_id, tsn; if (alias.cell) { const critter = critterAliasMap.get(alias.cell.toLowerCase()); if (critter) { + console.log(JSON.stringify(critter?.captures, null, 2)); + console.log(JSON.stringify(captureDate.cell, null, 2)); + console.log(JSON.stringify(captureTime.cell, null, 2)); const captures = findCapturesFromDateTime(critter.captures, captureDate.cell, captureTime.cell); + console.log(JSON.stringify(captures, null, 2)); critter_id = critter.critter_id; capture_id = captures.length === 1 ? captures[0].capture_id : undefined; tsn = String(critter.itis_tsn); // Cast to string for convienience