Improve database errors (NotFound -> Option)
This commit is contained in:
parent
be7f31906c
commit
8dab4b9a50
9 changed files with 96 additions and 78 deletions
emgauwa-lib/src/models
|
@ -38,8 +38,7 @@ impl Schedule {
|
|||
impl Relay {
|
||||
pub fn from_db_relay(relay: db::DbRelay, conn: &mut PoolConnection<Sqlite>) -> Self {
|
||||
let relay = relay.clone();
|
||||
let controller =
|
||||
executor::block_on(db::DbController::get(conn, relay.controller_id)).unwrap();
|
||||
let controller = executor::block_on(relay.get_controller(conn)).unwrap();
|
||||
let tags = executor::block_on(relay.get_tags(conn)).unwrap();
|
||||
|
||||
Relay {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue