diff --git a/src/routes/receipts.rs b/src/routes/receipts.rs index 5285fa0..8282699 100644 --- a/src/routes/receipts.rs +++ b/src/routes/receipts.rs @@ -113,7 +113,11 @@ pub async fn add_receipt( }, } }, - Some(ref id) => match ctx.firefly.get_transaction(id).await { + Some(ref id) if !id.is_empty() => match ctx + .firefly + .get_transaction(id) + .await + { Ok(t) => { let mut needs_update = false; let mut update = TransactionUpdate::from(t.data.clone()); @@ -166,6 +170,7 @@ pub async fn add_receipt( None }, }, + Some(_) => None, None => None, }; if let Some(xact) = xact {