From 4373f4d8f91a7a9f97cfeb475e713b1bdd1da60f Mon Sep 17 00:00:00 2001 From: youngcw Date: Thu, 26 Sep 2024 08:14:13 -0700 Subject: [PATCH] Ignore deleted categories when running templates (#3510) * don't look at deleted categories * note --- packages/loot-core/src/server/budget/statements.ts | 1 + upcoming-release-notes/3510.md | 6 ++++++ 2 files changed, 7 insertions(+) create mode 100644 upcoming-release-notes/3510.md 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