deltacloud-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mfoj...@apache.org
Subject [2/4] git commit: CIMI: Fix the case when XML properties are not set
Date Thu, 10 Jan 2013 10:12:31 GMT
CIMI: Fix the case when XML properties are not set


Project: http://git-wip-us.apache.org/repos/asf/deltacloud/repo
Commit: http://git-wip-us.apache.org/repos/asf/deltacloud/commit/1ae4f220
Tree: http://git-wip-us.apache.org/repos/asf/deltacloud/tree/1ae4f220
Diff: http://git-wip-us.apache.org/repos/asf/deltacloud/diff/1ae4f220

Branch: refs/heads/master
Commit: 1ae4f220eae9f9cedd62ac4cd2a2afb05a31bba2
Parents: e88fdc8
Author: Michal Fojtik <mfojtik@redhat.com>
Authored: Mon Jan 7 16:01:19 2013 +0100
Committer: Michal fojtik <mfojtik@redhat.com>
Committed: Thu Jan 10 11:12:12 2013 +0100

----------------------------------------------------------------------
 server/lib/cimi/models/address_template.rb |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/deltacloud/blob/1ae4f220/server/lib/cimi/models/address_template.rb
----------------------------------------------------------------------
diff --git a/server/lib/cimi/models/address_template.rb b/server/lib/cimi/models/address_template.rb
index c1623e2..c8a4de6 100644
--- a/server/lib/cimi/models/address_template.rb
+++ b/server/lib/cimi/models/address_template.rb
@@ -84,6 +84,7 @@ class CIMI::Model::AddressTemplate < CIMI::Model::Base
 
   def self.create_from_xml(body, context)
     xml = XmlSimple.xml_in(body)
+    xml['property'] ||= []
     new_template = current_db.address_templates.new(
       :name => xml['name'].first,
       :description => xml['description'].first,


Mime
View raw message