Compare commits

..

No commits in common. "9704893329930f62087b0c4ad299cc5486924bdc" and "daf9460bf7b1a5c6f9f220634582266d7654c916" have entirely different histories.

View File

@ -242,11 +242,11 @@ INNER JOIN trip_details ON planned_event.trip_details_id = trip_details.id",
.await .await
.unwrap(); //Okay, as planned_event can only be created with proper DB backing .unwrap(); //Okay, as planned_event can only be created with proper DB backing
if update.max_people == 0 && !was_already_cancelled { if max_people == 0 && !was_already_cancelled {
let coxes = Registration::all_cox(db, self.id).await; let coxes = Registration::all_cox(db, self.id).await;
for user in coxes { for user in coxes {
if let Some(user) = User::find_by_name(db, &user.name).await { if let Some(user) = User::find_by_name(db, &user.name).await {
let notes = match update.notes { let notes = match notes {
Some(n) if !n.is_empty() => n, 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; let rower = Registration::all_rower(db, self.trip_details_id).await;
for user in rower { for user in rower {
if let Some(user) = User::find_by_name(db, &user.name).await { if let Some(user) = User::find_by_name(db, &user.name).await {
let notes = match update.notes { let notes = match notes {
Some(n) if !n.is_empty() => n, 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 update.max_people > 0 && was_already_cancelled { if max_people > 0 && was_already_cancelled {
Notification::delete_by_action( Notification::delete_by_action(
db, db,
&format!("remove_user_trip_with_trip_details_id:{}", tripdetails.id), &format!("remove_user_trip_with_trip_details_id:{}", tripdetails.id),