receipts/add: Skip updating notes if unchanged
If the value of the `notes` form field is the same as the current value for the same field of an existing Firefly transaction, we do not need to update it.bugfix/ci-buildah
parent
1393c993e9
commit
f3d31a7256
|
@ -128,9 +128,13 @@ pub async fn add_receipt(
|
|||
needs_update = true;
|
||||
}
|
||||
if !data.notes.is_empty() {
|
||||
if let Some(notes) = split.notes.as_deref() {
|
||||
if notes != data.notes.as_str() {
|
||||
split.notes = Some(data.notes.clone());
|
||||
needs_update = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
} else {
|
||||
debug!("Transaction {} has no splits", id);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue