From 0b1b9794ba156b235612ae49dbbba46fc570a05d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=BC=A0=E7=8E=89=E6=96=8C?= <46096697+uuiid@users.noreply.github.com> Date: Fri, 20 Dec 2024 23:10:19 +0800 Subject: [PATCH] Fix type errors in SQL (#903) * Fix type errors in SQL * Update tasks_service.py --------- Co-authored-by: Evan Blaudy --- zou/app/services/tasks_service.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/zou/app/services/tasks_service.py b/zou/app/services/tasks_service.py index fb21633d0..ffb415bf8 100644 --- a/zou/app/services/tasks_service.py +++ b/zou/app/services/tasks_service.py @@ -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)