Merge branch 'staging' into 'main'

fix off-by-one error of not showing 'always show' trips 7 days before the event

See merge request PhilippHofer/rot!38
This commit is contained in:
PhilippHofer 2023-10-09 18:56:44 +00:00
commit 14cf5646b2
2 changed files with 2 additions and 2 deletions

View File

@ -26,7 +26,7 @@ pub struct PlannedEvent {
is_locked: bool, is_locked: bool,
} }
#[derive(Serialize)] #[derive(Serialize, Debug)]
pub struct PlannedEventWithUserAndTriptype { pub struct PlannedEventWithUserAndTriptype {
#[serde(flatten)] #[serde(flatten)]
pub planned_event: PlannedEvent, pub planned_event: PlannedEvent,

View File

@ -289,7 +289,7 @@ ORDER BY last_access DESC
} }
} }
for date in TripDetails::pinned_days(db, self.amount_days_to_show()).await { for date in TripDetails::pinned_days(db, self.amount_days_to_show() - 1).await {
if self.is_guest { if self.is_guest {
let day = Day::new_guest(db, date, true).await; let day = Day::new_guest(db, date, true).await;
if !day.planned_events.is_empty() { if !day.planned_events.is_empty() {