diff --git a/packages/loot-core/src/server/budget/statements.ts b/packages/loot-core/src/server/budget/statements.ts index 7b49ad31aa6..43a1af7d940 100644 --- a/packages/loot-core/src/server/budget/statements.ts +++ b/packages/loot-core/src/server/budget/statements.ts @@ -34,6 +34,7 @@ export async function getCategoriesWithTemplateNotes(): Promise< FROM notes n JOIN categories c ON n.id = c.id WHERE c.id = n.id + AND c.tombstone = 0 AND (lower(note) LIKE '%${TEMPLATE_PREFIX}%' OR lower(note) LIKE '%${GOAL_PREFIX}%') `, diff --git a/upcoming-release-notes/3510.md b/upcoming-release-notes/3510.md new file mode 100644 index 00000000000..9e060c92db7 --- /dev/null +++ b/upcoming-release-notes/3510.md @@ -0,0 +1,6 @@ +--- +category: Bugfix +authors: [youngcw] +--- + +Fix templates and syntax check running on deleted categories