From ae8ed5ecad9ea99987e030096432b123cd72dee5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?D=C3=A1vid=20Hal=C3=A1sz?= Date: Mon, 7 Jan 2019 16:52:36 +0100 Subject: [PATCH] Fixed regression on schedules screen due to bad towhat refactoring --- app/controllers/report_controller/schedules.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/controllers/report_controller/schedules.rb b/app/controllers/report_controller/schedules.rb index fa474f70034..4bc1ab9d2ab 100644 --- a/app/controllers/report_controller/schedules.rb +++ b/app/controllers/report_controller/schedules.rb @@ -39,9 +39,9 @@ def schedule_get_all @sortdir = session[:schedule_sortdir].nil? ? "ASC" : session[:schedule_sortdir] if super_admin_user? # Super admins see all user's schedules - @view, @pages = get_view(MiqSchedule, :named_scope => [[:with_resource_type, "MiqReport"]]) # Get the records (into a view) and the paginator + @view, @pages = get_view(MiqSchedule, :named_scope => [[:with_towhat, "MiqReport"]]) # Get the records (into a view) and the paginator else - @view, @pages = get_view(MiqSchedule, :named_scope => [[:with_resource_type, "MiqReport"], [:with_userid, session[:userid]]]) # Get the records (into a view) and the paginator + @view, @pages = get_view(MiqSchedule, :named_scope => [[:with_towhat, "MiqReport"], [:with_userid, session[:userid]]]) # Get the records (into a view) and the paginator end @current_page = @pages[:current] unless @pages.nil? # save the current page number