add_receipt: Fix editing Firefly xact notes
All checks were successful
dustin/receipts/pipeline/head This commit looks good

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.
This commit is contained in:
2025-05-07 18:24:04 -05:00
parent 166d86cf58
commit 0eb0618fd2

View File

@@ -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 {