diff --git a/packages/loot-core/src/server/budget/cleanup-template.ts b/packages/loot-core/src/server/budget/cleanup-template.ts index 48e520c0e17..941b40da379 100644 --- a/packages/loot-core/src/server/budget/cleanup-template.ts +++ b/packages/loot-core/src/server/budget/cleanup-template.ts @@ -57,6 +57,10 @@ async function processCleanup(month: string): Promise { [db_month, categoryId], ); + if (carryover === null) { + carryover = { carryover: 0 }; + } + if ( balance < 0 && Math.abs(balance) <= budgetAvailable && diff --git a/upcoming-release-notes/1750.md b/upcoming-release-notes/1750.md new file mode 100644 index 00000000000..cb2f399c5e1 --- /dev/null +++ b/upcoming-release-notes/1750.md @@ -0,0 +1,6 @@ +--- +category: Bugfix +authors: [shall0pass] +--- + +End of month cleanup - fixed condition that caused an error with null carryover value