I tried to make the following query as a Pythonic chained comparison for filtering a range of inequalities:
minSalary = 0
maxSalary = 4000
results = Employee.query.filter(minSalary <= Employee.salary <= maxSalary).all()
But I got this error:
TypeError: Boolean value of this clause is not defined