allow cancel of events #522
@ -239,6 +239,12 @@ WHERE day=?
|
|||||||
.await;
|
.await;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
} else {
|
||||||
|
Notification::delete_by_action(
|
||||||
|
db,
|
||||||
|
&format!("remove_user_trip_with_trip_details_id:{}", trip_details_id),
|
||||||
|
)
|
||||||
|
.await;
|
||||||
}
|
}
|
||||||
|
|
||||||
if max_people > 0 && was_already_cancelled {
|
if max_people > 0 && was_already_cancelled {
|
||||||
|
@ -77,6 +77,12 @@ WHERE day = ? AND planned_starting_time = ?
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if self.max_people == 0 {
|
||||||
|
// Cox cancelled event, thus it's probably bad weather. Don't bother with sending
|
||||||
|
// notifications
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
if Trip::find_by_trip_details(db, self.id).await.is_none() {
|
if Trip::find_by_trip_details(db, self.id).await.is_none() {
|
||||||
// This trip_details belongs to a planned_event, no need to do anything
|
// This trip_details belongs to a planned_event, no need to do anything
|
||||||
return;
|
return;
|
||||||
|
Loading…
Reference in New Issue
Block a user