main.rs::287 -- OperationInfo struct created with device_id set to 0. This will then create an operation entry in the device that doesn't correspond to any device and will essentially be a zombie and not found when looking for outstanding operations (since get_outstanding_tickets() will join operations table with the devices table).
Also change the struct to accept only valid input upon instantiation.