Skip to content

Commit

Permalink
Fix type errors in SQL (#903)
Browse files Browse the repository at this point in the history
* Fix type errors in SQL

* Update tasks_service.py

---------

Co-authored-by: Evan Blaudy <[email protected]>
  • Loading branch information
uuiid and EvanBldy authored Dec 20, 2024
1 parent 85e3288 commit 0b1b979
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions zou/app/services/tasks_service.py
Original file line number Diff line number Diff line change
Expand Up @@ -1970,10 +1970,12 @@ def get_open_tasks(
query_stats = query_stats.filter(Task.assignees.any(id=person_id))

if start_date is not None:
start_date = func.cast(start_date, Task.start_date.type)
query = query.filter(Task.start_date >= start_date)
query_stats = query_stats.filter(Task.start_date >= start_date)

if due_date is not None:
due_date = func.cast(due_date, Task.due_date.type)
query = query.filter(Task.due_date <= due_date)
query_stats = query_stats.filter(Task.due_date <= due_date)

Expand Down

0 comments on commit 0b1b979

Please sign in to comment.