From 05c4c4f6a2a8add17d8a77b7e8a3daa518845520 Mon Sep 17 00:00:00 2001 From: philipp Date: Wed, 22 May 2024 00:23:51 +0200 Subject: [PATCH] fix ci --- src/model/planned_event.rs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/model/planned_event.rs b/src/model/planned_event.rs index db6dac7..ec8c04d 100644 --- a/src/model/planned_event.rs +++ b/src/model/planned_event.rs @@ -242,11 +242,11 @@ INNER JOIN trip_details ON planned_event.trip_details_id = trip_details.id", .await .unwrap(); //Okay, as planned_event can only be created with proper DB backing - if max_people == 0 && !was_already_cancelled { + if update.max_people == 0 && !was_already_cancelled { let coxes = Registration::all_cox(db, self.id).await; for user in coxes { if let Some(user) = User::find_by_name(db, &user.name).await { - let notes = match notes { + let notes = match update.notes { Some(n) if !n.is_empty() => n, _ => ".", }; @@ -269,7 +269,7 @@ INNER JOIN trip_details ON planned_event.trip_details_id = trip_details.id", let rower = Registration::all_rower(db, self.trip_details_id).await; for user in rower { if let Some(user) = User::find_by_name(db, &user.name).await { - let notes = match notes { + let notes = match update.notes { Some(n) if !n.is_empty() => n, _ => ".", }; @@ -292,7 +292,7 @@ INNER JOIN trip_details ON planned_event.trip_details_id = trip_details.id", } } } - if max_people > 0 && was_already_cancelled { + if update.max_people > 0 && was_already_cancelled { Notification::delete_by_action( db, &format!("remove_user_trip_with_trip_details_id:{}", tripdetails.id),