Use equality for Task filtering in 'ls'

This commit is contained in:
Danny Robson 2020-05-21 10:57:39 +10:00
parent 8dd54cccdc
commit 31b5832fe1

View File

@ -45,7 +45,7 @@ def show_by_id(session: sa.orm.Session, index: int):
def ls(session: sa.orm.Session, _all: False):
vals = session.query(Task).order_by(Task.created_at)
if _all is False:
vals = vals.filter(Task.active is True)
vals = vals.filter(Task.active == True) # noqa
for i in vals:
show_by_obj(session, i)