From 6dd00ddec482ac794e0d6afecaa4f82552779a1d Mon Sep 17 00:00:00 2001 From: Allan Jorge Date: Sat, 21 Mar 2020 01:52:35 -0300 Subject: [PATCH] add check if process is unknown before saving --- src/process.rs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/process.rs b/src/process.rs index f8c4e90..4297dd3 100644 --- a/src/process.rs +++ b/src/process.rs @@ -20,7 +20,9 @@ pub async fn start( process_code: String, ) -> Result> { let p = fetch_for_one(&process_code).await?; - save(&telegram_id, &process_code, &p.status).await; + if p.status != "unknown" { + save(&telegram_id, &process_code, &p.status).await; + } Ok(p) }