From ae4cb67878705d5538e4242f07f27c0a840032a3 Mon Sep 17 00:00:00 2001 From: Ivan Kruglov Date: Fri, 10 Jan 2025 23:07:05 +0100 Subject: [PATCH] import: fix import of FEE record with unitPrice=0 --- apps/api/src/app/import/import.service.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/apps/api/src/app/import/import.service.ts b/apps/api/src/app/import/import.service.ts index 3b7290b43..813d7cfd8 100644 --- a/apps/api/src/app/import/import.service.ts +++ b/apps/api/src/app/import/import.service.ts @@ -328,7 +328,8 @@ export class ImportService { date ); - if (!unitPrice) { + // unitPrice can be 0 if it's a fee record + if (unitPrice === undefined) { throw new Error( `activities.${index} historical exchange rate at ${format( date,