From 85757a434769d40eccf0360dfbcd5dee463cbc43 Mon Sep 17 00:00:00 2001 From: Thomas <4159106+dtslvr@users.noreply.github.com> Date: Sun, 5 Nov 2023 09:36:37 +0100 Subject: [PATCH] Handle issue with account.findMany() where: { id: { in: [ null ] } } --- apps/api/src/app/portfolio/portfolio.service.ts | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/apps/api/src/app/portfolio/portfolio.service.ts b/apps/api/src/app/portfolio/portfolio.service.ts index b2538fb6a..525273253 100644 --- a/apps/api/src/app/portfolio/portfolio.service.ts +++ b/apps/api/src/app/portfolio/portfolio.service.ts @@ -1892,9 +1892,13 @@ export class PortfolioService { }); } else { const accountIds = uniq( - orders.map(({ accountId }) => { - return accountId; - }) + orders + .filter(({ accountId }) => { + return accountId; + }) + .map(({ accountId }) => { + return accountId; + }) ); currentAccounts = await this.accountService.accounts({