From 400a0c6b1a016ab9f5e2da07e608e0675195bed1 Mon Sep 17 00:00:00 2001 From: Ramir Mesquita Date: Tue, 10 Dec 2024 07:38:30 -0300 Subject: [PATCH] fix: change schema query to make more appropriate --- src/apps/answers/crud/answers.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/apps/answers/crud/answers.py b/src/apps/answers/crud/answers.py index d435bf4eab8..4be9db5f885 100644 --- a/src/apps/answers/crud/answers.py +++ b/src/apps/answers/crud/answers.py @@ -234,7 +234,7 @@ async def get_respondents_submit_dates( query = query.where(func.date(AnswerSchema.created_at) >= filters.from_date) query = query.where(func.date(AnswerSchema.created_at) <= filters.to_date) query = query.where(AnswerSchema.applet_id == applet_id) - query = query.where(AnswerSchema.activity_history_id.contains(filters.activity_id)) + query = query.where(AnswerSchema.id_from_history_id(AnswerSchema.activity_history_id) == str(filters.activity_id)) if filters.respondent_id: query = query.where(AnswerSchema.respondent_id == filters.respondent_id)