From 54f735551c4c3bb83cd9a0571f14f68e3c24ef8e Mon Sep 17 00:00:00 2001 From: Mojca Lorber Date: Tue, 14 May 2019 13:50:10 +0200 Subject: [PATCH] Fix broken global activities team filter --- app/models/team.rb | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/app/models/team.rb b/app/models/team.rb index f0827a728..ec148ef9b 100644 --- a/app/models/team.rb +++ b/app/models/team.rb @@ -2,7 +2,6 @@ class Team < ApplicationRecord include SearchableModel include ViewableModel include TeamBySubjectModel - include InputSanitizeHelper # Not really MVC-compliant, but we just use it for logger # output in space_taken related functions @@ -322,7 +321,7 @@ class Team < ApplicationRecord query = query.where(id: users_team) end query = query.where(id: team_by_subject(filters[:subjects])) if filters[:subjects] - query.select(:id, :name).map { |res| [res[0], escape_input(res[1])] } + query.select(:id, :name).map { |i| { id: i[:id], name: ApplicationController.helpers.escape_input(i[:name]) } } end private