Skip to content
This repository has been archived by the owner on Jan 20, 2024. It is now read-only.

Commit

Permalink
Fix querying by text
Browse files Browse the repository at this point in the history
  • Loading branch information
tdemin committed Jun 11, 2019
1 parent 59c4242 commit 7d0b5d4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion project_amber/helpers/task.py
Expand Up @@ -36,7 +36,7 @@ def getTasks(uid: int, text: str = None) -> list:
req = db.session.query(Task).filter_by(owner=uid)
if text is None:
return req.all()
return req.filter(text in Task.text).all()
return req.filter(Task.text.ilike("%{0}%".format(text))).all()

def updateTask(task_id: int, uid: int, **kwargs) -> int:
"""
Expand Down

0 comments on commit 7d0b5d4

Please sign in to comment.