diff --git a/apps/api/src/app/endpoints/export/export.service.ts b/apps/api/src/app/endpoints/export/export.service.ts index e58adfca89..de95854dda 100644 --- a/apps/api/src/app/endpoints/export/export.service.ts +++ b/apps/api/src/app/endpoints/export/export.service.ts @@ -116,9 +116,15 @@ export class ExportService { } return { - balances: balances.map(({ comment, date, value }) => { - return { comment, value, date: date.toISOString() }; - }), + balances: balances.map( + ({ comment: balanceComment, date, value }) => { + return { + ...(balanceComment ? { comment: balanceComment } : {}), + value, + date: date.toISOString() + }; + } + ), comment, currency, id, diff --git a/libs/common/src/lib/interfaces/account-balance.interface.ts b/libs/common/src/lib/interfaces/account-balance.interface.ts index cdbe0f544c..11d6445e1e 100644 --- a/libs/common/src/lib/interfaces/account-balance.interface.ts +++ b/libs/common/src/lib/interfaces/account-balance.interface.ts @@ -1,5 +1,5 @@ export interface AccountBalance { - comment: string | null; + comment?: string; date: string; value: number; }