Skip to content

Commit

Permalink
fix #308 only last empty hash ist stored
Browse files Browse the repository at this point in the history
  • Loading branch information
lbetz committed Jun 1, 2017
1 parent b03a02f commit 0eecf4c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/puppet_x/icinga2/utils.rb
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@ def self.process_hash(attrs, indent=2, level=3, prefix=' '*indent)
attrs.each do |attr, value|
if value.is_a?(Hash)
if value.empty?
result = case level
result += case level
when 1 then "%s%s = {}\n" % [ prefix, attribute_types(attr) ]
when 2 then "%s[\"%s\"] = {}\n" % [ prefix, attr ]
else "%s%s = {}\n" % [ prefix, attribute_types(attr) ]
Expand Down

0 comments on commit 0eecf4c

Please sign in to comment.