Compare commits

...

3 Commits

Author SHA1 Message Date
e7732b9e96 Merge pull request 'fix-ci' (#528) from fix-ci into staging
All checks were successful
CI/CD Pipeline / test (push) Successful in 9m55s
CI/CD Pipeline / deploy-staging (push) Successful in 7m20s
CI/CD Pipeline / deploy-main (push) Has been skipped
Reviewed-on: #528
2024-05-22 00:24:22 +02:00
05c4c4f6a2 fix ci
Some checks failed
CI/CD Pipeline / deploy-staging (push) Has been cancelled
CI/CD Pipeline / deploy-main (push) Has been cancelled
CI/CD Pipeline / test (push) Has been cancelled
2024-05-22 00:23:51 +02:00
daf9460bf7 Merge pull request 'clean code with clippy' (#527) from clippy into main
Some checks failed
CI/CD Pipeline / test (push) Failing after 1m2s
CI/CD Pipeline / deploy-staging (push) Has been skipped
CI/CD Pipeline / deploy-main (push) Has been skipped
Reviewed-on: #527
2024-05-22 00:18:47 +02:00

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 max_people == 0 && !was_already_cancelled { if update.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 notes { let notes = match update.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 notes { let notes = match update.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 max_people > 0 && was_already_cancelled { if update.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),