From 0bd7c1e68d50448fa6f8661f9bdc5eae2164361c Mon Sep 17 00:00:00 2001 From: Caio <117518+caiosba@users.noreply.github.com> Date: Mon, 2 Sep 2024 22:14:13 -0300 Subject: [PATCH] Ticket CV2-5067: Another minor change to data export --- app/models/team.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/models/team.rb b/app/models/team.rb index a3d8572e5..9facc8b32 100644 --- a/app/models/team.rb +++ b/app/models/team.rb @@ -532,7 +532,7 @@ def filtered_fact_checks(filters = {}) query = query.where('fact_checks.imported' => !!filters[:imported]) unless filters[:imported].nil? # Filter by report status - query = query.where('fact_checks.report_status' => filters[:report_status].to_a.map(&:to_s)) unless filters[:report_status].blank? + query = query.where('fact_checks.report_status' => [filters[:report_status]].flatten.map(&:to_s)) unless filters[:report_status].blank? # Filter by text query = self.filter_by_keywords(query, filters) if filters[:text].to_s.size > 2