Skip to content

A local-first personal finance app

🐛 [Bug] Cant edit template rules (#4686)

Alec Bakholdin5d01e109e61e
diff --git a/packages/desktop-client/src/components/modals/EditRuleModal.jsx b/packages/desktop-client/src/components/modals/EditRuleModal.jsx
index 1f8f5f1c3a..4c10846cd1 100644
--- a/packages/desktop-client/src/components/modals/EditRuleModal.jsx
+++ b/packages/desktop-client/src/components/modals/EditRuleModal.jsx
@@ -894,7 +894,10 @@ export function EditRuleModal({
} else {
a[field] = value;
if (a.options?.template !== undefined) {
- a.options.template = value;
+ a.options = {
+ ...a.options,
+ template: value,
+ };
}
if (field === 'field') {
diff --git a/upcoming-release-notes/4686.md b/upcoming-release-notes/4686.md
new file mode 100644
index 0000000000..c83865ab09
--- /dev/null
+++ b/upcoming-release-notes/4686.md
@@ -0,0 +1,6 @@
+---
+category: Bugfix
+authors: [alecbakholdin]
+---
+
+Fixed bug where saving rules with templates would fail