From 0bdd073d7f2e187f157913bbd9e14b0218e1aed6 Mon Sep 17 00:00:00 2001 From: philipp Date: Tue, 4 Apr 2023 12:23:41 +0200 Subject: [PATCH] fix bug --- src/model/planned_event.rs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/model/planned_event.rs b/src/model/planned_event.rs index d41a3ab..e11d8ff 100644 --- a/src/model/planned_event.rs +++ b/src/model/planned_event.rs @@ -17,13 +17,16 @@ pub struct PlannedEvent { impl PlannedEvent { pub async fn get_for_day(db: &SqlitePool, day: NaiveDate) -> Vec { + let day = format!("{}", day); sqlx::query_as!( PlannedEvent, " SELECT planned_event.id, name, planned_amount_cox, allow_guests, trip_details_id, planned_starting_time, max_people, day, notes FROM planned_event INNER JOIN trip_details ON planned_event.trip_details_id = trip_details.id - " +WHERE day=? + ", + day ) .fetch_all(db) .await