app/lib/actions/proxy_action.rb in foreman-tasks-4.0.1 vs app/lib/actions/proxy_action.rb in foreman-tasks-4.1.0
- old
+ new
@@ -216,13 +216,11 @@
end
suspend
end
def get_proxy_data(response)
- proxy_data = response['actions'].detect do |action|
- action['class'] == proxy_action_name || action.fetch('input', {})['proxy_operation_name'] == proxy_operation_name
- end
- proxy_data.fetch('output', {})
+ response['actions'].detect { |action| action.fetch('input', {})['task_id'] == task.id }
+ .try(:fetch, 'output', {})
end
def proxy_version(proxy)
match = proxy.statuses[:version].version['version'].match(/(\d+)\.(\d+)\.(\d+)/)
{ :major => match[1].to_i, :minor => match[2].to_i, :patch => match[3].to_i }