From 6b25bec24762283ec440e5caa3e87c834d73966c Mon Sep 17 00:00:00 2001 From: Mooli Tayer Date: Fri, 3 Mar 2017 15:20:21 +0200 Subject: [PATCH] Do not pass the same argument twice --- .../providers/kubernetes/container_manager_mixin.rb | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/app/models/manageiq/providers/kubernetes/container_manager_mixin.rb b/app/models/manageiq/providers/kubernetes/container_manager_mixin.rb index 3296b21c63a..a301ceafdb2 100644 --- a/app/models/manageiq/providers/kubernetes/container_manager_mixin.rb +++ b/app/models/manageiq/providers/kubernetes/container_manager_mixin.rb @@ -150,7 +150,7 @@ def default_authentication_type end def scan_job_create(entity) - check_policy_prevent(:request_containerimage_scan, entity, :raw_scan_job_create, entity) + check_policy_prevent(:request_containerimage_scan, entity, :raw_scan_job_create) end def raw_scan_job_create(entity) @@ -169,12 +169,12 @@ def raw_scan_job_create(entity) # policy_event: the event sent to automate for policy resolution # cb_method: the MiqQueue callback method along with the parameters that is called # when automate process is done and the event is not prevented to proceed by policy - def check_policy_prevent(policy_event, event_target, *cb_method) + def check_policy_prevent(policy_event, event_target, cb_method) cb = { :class_name => self.class.to_s, :instance_id => id, :method_name => :check_policy_prevent_callback, - :args => [*cb_method], + :args => [cb_method, event_target], :server_guid => MiqServer.my_guid } enforce_policy(event_target, policy_event, {}, { :miq_callback => cb }) unless policy_event.nil?