Skip to content

Commit

Permalink
add check if process is unknown before saving
Browse files Browse the repository at this point in the history
  • Loading branch information
hails committed Mar 21, 2020
1 parent 3696070 commit 6dd00dd
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/process.rs
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,9 @@ pub async fn start(
process_code: String,
) -> Result<ProcessResponse, Box<dyn error::Error>> {
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)
}
Expand Down

0 comments on commit 6dd00dd

Please sign in to comment.