1
0
Fork 0
mirror of https://github.com/fog/fog.git synced 2022-11-09 13:51:43 -05:00

Guard against item_name not being a valid key.

This commit is contained in:
Christopher Meiklejohn 2011-07-11 16:37:13 -04:00
parent d15cdeb8df
commit 9a4f45c9df

View file

@ -58,7 +58,7 @@ module Fog
object = {}
if !options['AttributeName'].empty?
for attribute in options['AttributeName']
if self.data[:domains][domain_name][item_name].keys.include?(attribute)
if self.data[:domains][domain_name].keys.include?(item_name) && self.data[:domains][domain_name][item_name].keys.include?(attribute)
object[attribute] = self.data[:domains][domain_name][item_name][attribute]
end
end