Move logic around to find bug

This commit is contained in:
Bastian Gruber 2023-05-22 10:40:33 +02:00
parent b70dbbb24b
commit 9e7b2af480
No known key found for this signature in database
GPG key ID: BE9F8C772B188CBF

View file

@ -54,6 +54,7 @@ pub(crate) async fn issue_possible_ticket(db: &mut Db, plate: Plate, camera_id:
continue;
}
db.ticket_plate(day, plate_name.clone());
let dispatcher = db.get_dispatcher_for_road(road.clone());
if dispatcher.is_none() {
@ -64,7 +65,6 @@ pub(crate) async fn issue_possible_ticket(db: &mut Db, plate: Plate, camera_id:
info!("Sending ticket: {ticket:?}");
let _ = dispatcher.unwrap().send(ticket.clone().into()).await;
db.ticket_plate(day, plate_name.clone());
}
}
}