From 0eb0618fd281ea1e2282a9ee3fa5435bb13627fe Mon Sep 17 00:00:00 2001 From: "Dustin C. Hatch" Date: Wed, 7 May 2025 18:24:04 -0500 Subject: [PATCH] add_receipt: Fix editing Firefly xact notes If a new receipt is being attached to an existing Firefly transaction, we need to update the notes field of the transaction to match what's specified with the receipt. This was happening correctly for transactions that already had value in its notes field, but not for transactions without any notes at all. The reason for this is because we were only updating the field inside a conditional that checked if the existing value was not equal to the new value, but it did not account for the case where there was no existing value at all. --- src/routes/receipts.rs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/routes/receipts.rs b/src/routes/receipts.rs index bb8ecd7..d2e6677 100644 --- a/src/routes/receipts.rs +++ b/src/routes/receipts.rs @@ -138,6 +138,9 @@ pub async fn add_receipt( split.notes = Some(data.notes.clone()); needs_update = true; } + } else { + split.notes = data.notes.into(); + needs_update = true; } } } else {