Skip to content

Commit 5800a03

Browse files
rpluem-vfekohl
andauthored
Improve hash lookup
Co-authored-by: Ewoud Kohl van Wijngaarden <[email protected]>
1 parent 049a073 commit 5800a03

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

app/helpers/foreman_ansible/ansible_reports_helper.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ def get_results(msg_json)
109109
results = msg_json.key?('results') ? msg_json['results'] : [msg_json]
110110
results.map do |result|
111111
if result.is_a?(Hash)
112-
module_args = result.fetch('invocation', {}).fetch('module_args', {})
112+
module_args = result.dig('invocation', 'module_args') || {}
113113
yield module_args, result
114114
end
115115
end

0 commit comments

Comments
 (0)