Browse Source

serve/index: filter by dtstart>=today for dtend=null

master
Astro 11 months ago
parent
commit
53a11663ee
  1. 3
      ticker-serve/src/index.rs

3
ticker-serve/src/index.rs

@ -60,7 +60,8 @@ fn render_index(app_state: &AppState) -> String {
Duration::weeks(2);
let es = events
.filter(schema::events::dtend.ge(&today))
.filter(schema::events::dtend.lt(&limit))
.or_filter(schema::events::dtstart.ge(&today))
.filter(schema::events::dtstart.lt(&limit))
.order_by(schema::events::dtstart.asc())
.then_order_by(schema::events::dtend.desc())
.load::<Event>(&*db)

Loading…
Cancel
Save