Skip to content

Commit

Permalink
Merge d84a05a into 3648244
Browse files Browse the repository at this point in the history
  • Loading branch information
grindars committed Sep 4, 2013
2 parents 3648244 + d84a05a commit 3ddfbb4
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions lib/pipedrive/base.rb
Expand Up @@ -32,10 +32,16 @@ class Base < OpenStruct
# @return [CloudApp::Base]
def initialize(attrs = {})
if attrs['data']
super( attrs['data'] )
struct_attrs = attrs['data']

if attrs['additional_data']
struct_attrs.merge!(attrs['additional_data'])
end
else
super(attrs)
struct_attrs = attrs
end

super(struct_attrs)
end

# Updates the object.
Expand Down

0 comments on commit 3ddfbb4

Please sign in to comment.