deltacloud-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From David Lutterkort <lut...@redhat.com>
Subject Re: [PATCH] CIMI bug - create CIMI db resource with no properties - Fix for DTACLOUD-448
Date Fri, 08 Feb 2013 00:46:05 GMT
On Thu, 2013-01-31 at 19:14 +0200, marios@redhat.com wrote:
> diff --git a/server/lib/cimi/models/address_template.rb b/server/lib/cimi/models/address_template.rb
> index 41d86f6..b804396 100644
> --- a/server/lib/cimi/models/address_template.rb
> +++ b/server/lib/cimi/models/address_template.rb
> @@ -67,7 +67,7 @@ class CIMI::Model::AddressTemplate < CIMI::Model::Base
>        :dns => json['dns'],
>        :protocol => json['protocol'],
>        :mask => json['mask'],
> -      :ent_properties => json['properties'].to_json
> +      :ent_properties => json['properties'] ? json['properties'].to_json : {}

You're assigning either a string or a hash; shouldn't that be
        :ent_properties => (json['properties'] || {}).to_json

Other than that, ACK to the patch - though we should get rid of handling
json/xml representations directly in favor of XXXCreate models.

David



Mime
View raw message