add_receipt: Fix editing Firefly xact notes
dustin/receipts/pipeline/head This commit looks good
Details
dustin/receipts/pipeline/head This commit looks good
Details
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.master
parent
166d86cf58
commit
0eb0618fd2
|
@ -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 {
|
||||
|
|
Loading…
Reference in New Issue