forked from crudo/macao-pos
Fix query bug that prevented events with undefined end date being used.
This commit is contained in:
parent
8c4540e82c
commit
67ae28fcac
4
web.py
4
web.py
|
@ -94,8 +94,8 @@ def get_products(session):
|
||||||
def get_event(session):
|
def get_event(session):
|
||||||
return session.query(Event)\
|
return session.query(Event)\
|
||||||
.filter(Event.starts_at < datetime.now())\
|
.filter(Event.starts_at < datetime.now())\
|
||||||
.filter((Event.ends_at > datetime.now()) |
|
.filter((Event.ends_at.is_(None))
|
||||||
(Event.ends_at is None))\
|
| (Event.ends_at > datetime.now()))\
|
||||||
.one_or_none()
|
.one_or_none()
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user