Return all students if mode is null
This commit is contained in:
parent
468951d9bb
commit
96151d0598
@ -31,9 +31,8 @@ class Student(Person):
|
|||||||
order_by_last_name: str = None) -> BaseQuery:
|
order_by_last_name: str = None) -> BaseQuery:
|
||||||
student_query = cls.query
|
student_query = cls.query
|
||||||
|
|
||||||
if mode is None:
|
if mode is not None:
|
||||||
mode = True
|
student_query = student_query.filter_by(mode=mode)
|
||||||
student_query = student_query.filter_by(mode=mode)
|
|
||||||
|
|
||||||
if fullname is not None:
|
if fullname is not None:
|
||||||
"""This works only for sqlite3 database - concat function doesn't exist so i used builtin concat
|
"""This works only for sqlite3 database - concat function doesn't exist so i used builtin concat
|
||||||
|
Loading…
Reference in New Issue
Block a user