Minor template refactor and cli.py user interface enhancement #6

Closed
subnixr wants to merge 15 commits from subnixr/macao-pos:cosettine into master
Showing only changes of commit 67ae28fcac - Show all commits

4
web.py
View File

@ -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()