fix off-by-one error of not showing 'always show' trips 7 days before the event
This commit is contained in:
parent
c323b209d0
commit
1581570d97
@ -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,
|
||||||
|
@ -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() {
|
||||||
|
Loading…
Reference in New Issue
Block a user