lib/fog/azurerm/models/compute/creation_data.rb in fog-azure-rm-0.3.3 vs lib/fog/azurerm/models/compute/creation_data.rb in fog-azure-rm-0.3.4
- old
+ new
@@ -9,11 +9,13 @@
attribute :source_resource_id
attribute :image_reference
def self.parse(creation_data)
data = get_hash_from_object(creation_data)
- image_reference = Fog::Compute::AzureRM::ImageDiskReference.new
- data['image_reference'] = image_reference.merge_attributes(Fog::Compute::AzureRM::ImageDiskReference.parse(creation_data.image_reference))
+ unless creation_data.image_reference.nil?
+ image_reference = Fog::Compute::AzureRM::ImageDiskReference.new
+ data['image_reference'] = image_reference.merge_attributes(Fog::Compute::AzureRM::ImageDiskReference.parse(creation_data.image_reference))
+ end
data
end
end
end
end