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

This commit is contained in:
philipp 2023-10-09 20:42:01 +02:00
parent c323b209d0
commit 1581570d97
2 changed files with 2 additions and 2 deletions

View File

@ -26,7 +26,7 @@ pub struct PlannedEvent {
is_locked: bool,
}
#[derive(Serialize)]
#[derive(Serialize, Debug)]
pub struct PlannedEventWithUserAndTriptype {
#[serde(flatten)]
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 {
let day = Day::new_guest(db, date, true).await;
if !day.planned_events.is_empty() {