lib/resources/etc_group.rb in inspec-2.1.54 vs lib/resources/etc_group.rb in inspec-2.1.59
- old
+ new
@@ -76,13 +76,15 @@
users: 'members',
members: 'members',
}
res = entries
- conditions.each do |k, v|
- idx = fields[k.to_sym]
- next if idx.nil?
- res = res.select { |x| x[idx].to_s == v.to_s }
+ unless res.nil?
+ conditions.each do |k, v|
+ idx = fields[k.to_sym]
+ next if idx.nil?
+ res = res.select { |x| x[idx].to_s == v.to_s }
+ end
end
EtcGroupView.new(self, res)
end