From 23aa6aa0f843aac39cd4da83f2382db0b26272b2 Mon Sep 17 00:00:00 2001 From: philipp Date: Sun, 28 Jul 2024 07:43:56 +0200 Subject: [PATCH] push --- src/model/logbook.rs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/model/logbook.rs b/src/model/logbook.rs index 24c7a4a..c99b107 100644 --- a/src/model/logbook.rs +++ b/src/model/logbook.rs @@ -179,8 +179,8 @@ impl From for LogbookCreateError { } LogbookUpdateError::TooFast(km, min) => LogbookCreateError::TooFast(km, min), LogbookUpdateError::AlreadyFinalized => LogbookCreateError::AlreadyFinalized, - LogbookUpdateError::ExternalSteeringPersonMustSteer => { - LogbookCreateError::ExternalSteeringPersonMustSteer + LogbookUpdateError::ExternalSteeringPersonMustSteerOrShipmaster => { + LogbookCreateError::ExternalSteeringPersonMustSteerOrShipmaster } } } @@ -626,6 +626,7 @@ ORDER BY departure DESC self.remove_rowers(db).await; for rower in &log.rowers { + let user = User::find_by_id_tx(db, *rower as i32).await.unwrap(); if user.name == "Externe Steuerperson" { if let (Some(steering_id), Some(shipmaster_id)) = (log.steering_person, log.shipmaster) -- 2.45.2