Merge pull request #5826 from G-Chubinidze/gc_SCI_8820

Error at inviting user to SciNote [SCI-8820]
This commit is contained in:
artoscinote 2023-07-20 10:47:19 +02:00 committed by GitHub
commit b0f45713cf
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -150,8 +150,7 @@ module Users
.distinct
teams = teams.where_attributes_like('teams.name', params[:query]) if params[:query].present?
teams.select { |team| can_invite_team_users?(team) }
teams = teams.select { |team| can_invite_team_users?(team) }
render json: teams.map { |t| { value: t.id, label: escape_input(t.name) } }.to_json
end