From 39c31e759ac7f568f6a8e03ee92f5fe928394d0e Mon Sep 17 00:00:00 2001 From: Ahmad Farhat Date: Thu, 11 Jun 2020 10:21:11 -0400 Subject: [PATCH] Fixed issue causing manage users to through 500 (#1778) --- app/controllers/concerns/populator.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/controllers/concerns/populator.rb b/app/controllers/concerns/populator.rb index 79b72724..1b81acfe 100644 --- a/app/controllers/concerns/populator.rb +++ b/app/controllers/concerns/populator.rb @@ -23,7 +23,7 @@ module Populator def manage_users_list current_role = @role - initial_user = case @tab + initial_list = case @tab when "active" User.without_role([:pending, :denied]) when "deleted" @@ -34,7 +34,7 @@ module Populator current_role = Role.find_by(name: @tab, provider: @user_domain) if @tab == "pending" || @tab == "denied" - initial_list = initial_user.without_role(:super_admin) unless current_user.has_role? :super_admin + initial_list = initial_list.without_role(:super_admin) unless current_user.has_role? :super_admin initial_list = initial_list.where(provider: @user_domain) if Rails.configuration.loadbalanced_configuration