deltacloud-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "marios@redhat.com" <mandr...@redhat.com>
Subject Re: [PATCH core 1/2] CIMI: Fix $select filter to undercore attributes (DTACLOUD-391)
Date Thu, 06 Dec 2012 10:06:43 GMT
ACK both - JIRA seems down for maintenance right now so can't
ACK/resolve the relevant tickets 391 and 388

marios

On 05/12/12 19:06, mfojtik@redhat.com wrote:
> From: Michal Fojtik <mfojtik@redhat.com>
> 
> 
> Signed-off-by: Michal fojtik <mfojtik@redhat.com>
> ---
>  server/lib/cimi/models/base.rb | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/server/lib/cimi/models/base.rb b/server/lib/cimi/models/base.rb
> index 2b13367..2988459 100644
> --- a/server/lib/cimi/models/base.rb
> +++ b/server/lib/cimi/models/base.rb
> @@ -279,7 +279,8 @@ class CIMI::Model::Base < CIMI::Model::Resource
>  
>    def filter_attributes(attr_list)
>      attrs = attr_list.inject({}) do |result, attr|
> -      result[attr] = self.send(attr) if self.respond_to?(attr)
> +      attr = attr.to_s.underscore
> +      result[attr.to_sym] = self.send(attr) if self.respond_to?(attr)
>        result
>      end
>      self.class.new(attrs)
> 


Mime
View raw message