From 0bc00472d7b104d20855fe54ff4eca1bab16300b Mon Sep 17 00:00:00 2001 From: philipp Date: Mon, 15 Apr 2024 18:22:58 +0200 Subject: [PATCH] don't create any notification if we are working with planned_event --- src/model/tripdetails.rs | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/model/tripdetails.rs b/src/model/tripdetails.rs index ec59386..0667766 100644 --- a/src/model/tripdetails.rs +++ b/src/model/tripdetails.rs @@ -77,6 +77,14 @@ WHERE day = ? AND planned_starting_time = ? return; } + if Trip::find_by_trip_details(db, trip_details.id) + .await + .is_none() + { + // This trip_details belongs to a planned_event, no need to do anything + return; + }; + let other_trips_same_time = Self::find_by_startingdatetime( db, self.day.clone(),