From d7635755f2a8a5c09c658b551c85c4c63cabbe51 Mon Sep 17 00:00:00 2001 From: Robert Dyer <rdyer@unl.edu> Date: Thu, 21 Mar 2024 09:45:58 -0500 Subject: [PATCH] Fix error when viewing uncategorized transactions when there are upcoming scheduled transactions. (#2475) * fix: Error when opening uncategorized transactions page * add release note * fix linter warning --- .../desktop-client/src/components/accounts/Account.jsx | 10 +++++++--- upcoming-release-notes/2475.md | 6 ++++++ 2 files changed, 13 insertions(+), 3 deletions(-) create mode 100644 upcoming-release-notes/2475.md diff --git a/packages/desktop-client/src/components/accounts/Account.jsx b/packages/desktop-client/src/components/accounts/Account.jsx index 8d6923cb4..3efff4ec9 100644 --- a/packages/desktop-client/src/components/accounts/Account.jsx +++ b/packages/desktop-client/src/components/accounts/Account.jsx @@ -1641,9 +1641,13 @@ export function Account() { $and: [{ '_account.closed': false }], }); if (params.id) { - q = q.filter({ - $or: [filterByAccount, filterByPayee], - }); + if (params.id === 'uncategorized') { + q = q.filter({ next_date: null }); + } else { + q = q.filter({ + $or: [filterByAccount, filterByPayee], + }); + } } return q.orderBy({ next_date: 'desc' }); }; diff --git a/upcoming-release-notes/2475.md b/upcoming-release-notes/2475.md new file mode 100644 index 000000000..41b54e6bc --- /dev/null +++ b/upcoming-release-notes/2475.md @@ -0,0 +1,6 @@ +--- +category: Bugfix +authors: [psybers] +--- + +Fix error when viewing uncategorized transactions when there are upcoming scheduled transactions. \ No newline at end of file -- GitLab