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,8 +128,12 @@ pub async fn add_receipt(
|
||||||
needs_update = true;
|
needs_update = true;
|
||||||
}
|
}
|
||||||
if !data.notes.is_empty() {
|
if !data.notes.is_empty() {
|
||||||
split.notes = Some(data.notes.clone());
|
if let Some(notes) = split.notes.as_deref() {
|
||||||
needs_update = true;
|
if notes != data.notes.as_str() {
|
||||||
|
split.notes = Some(data.notes.clone());
|
||||||
|
needs_update = true;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
debug!("Transaction {} has no splits", id);
|
debug!("Transaction {} has no splits", id);
|
||||||
|
|
Loading…
Reference in New Issue