remove debug println; better phrasing
All checks were successful
CI/CD Pipeline / test (push) Successful in 9m26s
CI/CD Pipeline / deploy-staging (push) Has been skipped
CI/CD Pipeline / deploy-main (push) Has been skipped

This commit is contained in:
2024-05-30 11:57:03 +02:00
parent e8d4672176
commit 2de4c86c26
3 changed files with 9 additions and 22 deletions

View File

@ -259,10 +259,9 @@ WHERE trip_details.id=?
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 = if let Some(notes) = update.notes {
format!("Grund der Absage: {notes}")
} else {
String::from("")
let notes = match update.notes {
Some(n) if !n.is_empty() => format!("Grund der Absage: {n}"),
_ => String::from(""),
};
Notification::create(
db,
@ -282,10 +281,9 @@ WHERE 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 = if let Some(notes) = update.notes {
format!("Grund der Absage: {notes}")
} else {
String::from("")
let notes = match update.notes {
Some(n) if !n.is_empty() => format!("Grund der Absage: {n}"),
_ => String::from(""),
};
Notification::create(