mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2025-01-02 21:51:51 +08:00
Merge pull request #1761 from mlorb/ml-sci-3456
Fix broken global activities team filter [SCI-3456]
This commit is contained in:
commit
13d126bc39
1 changed files with 1 additions and 2 deletions
|
@ -2,7 +2,6 @@ class Team < ApplicationRecord
|
||||||
include SearchableModel
|
include SearchableModel
|
||||||
include ViewableModel
|
include ViewableModel
|
||||||
include TeamBySubjectModel
|
include TeamBySubjectModel
|
||||||
include InputSanitizeHelper
|
|
||||||
|
|
||||||
# Not really MVC-compliant, but we just use it for logger
|
# Not really MVC-compliant, but we just use it for logger
|
||||||
# output in space_taken related functions
|
# output in space_taken related functions
|
||||||
|
@ -322,7 +321,7 @@ class Team < ApplicationRecord
|
||||||
query = query.where(id: users_team)
|
query = query.where(id: users_team)
|
||||||
end
|
end
|
||||||
query = query.where(id: team_by_subject(filters[:subjects])) if filters[:subjects]
|
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
|
end
|
||||||
|
|
||||||
private
|
private
|
||||||
|
|
Loading…
Reference in a new issue