@ -126,6 +126,7 @@ pub enum LogbookCreateError {
|
||||
NotYourEntry,
|
||||
ArrivalSetButNotRemainingTwo,
|
||||
OnlyAllowedToEndTripsEndingToday,
|
||||
CantChangeHandoperatableStatusForThisBoat,
|
||||
}
|
||||
|
||||
impl From<LogbookUpdateError> for LogbookCreateError {
|
||||
@ -302,6 +303,12 @@ ORDER BY departure DESC
|
||||
return Err(LogbookCreateError::BoatNotFound);
|
||||
};
|
||||
|
||||
if log.shipmaster_only_steering != boat.default_shipmaster_only_steering {
|
||||
if !boat.convert_handoperated_possible {
|
||||
return Err(LogbookCreateError::CantChangeHandoperatableStatusForThisBoat);
|
||||
}
|
||||
}
|
||||
|
||||
if boat.amount_seats == 1 && log.rowers.is_empty() {
|
||||
log.rowers = vec![created_by_user.id];
|
||||
}
|
||||
|
Reference in New Issue
Block a user