mirror of
https://github.com/fog/fog.git
synced 2022-11-09 13:51:43 -05:00
[ec2] fix volume model to not muck with attributes, which breaks mocks
This commit is contained in:
parent
f344c2816e
commit
c2b4983b9d
1 changed files with 4 additions and 3 deletions
|
@ -22,9 +22,6 @@ module Fog
|
|||
def initialize(attributes = {})
|
||||
# assign server first to prevent race condition with new_record?
|
||||
self.server = attributes.delete(:server)
|
||||
if attributes['attachmentSet']
|
||||
attributes.merge!(attributes.delete('attachmentSet').first || {})
|
||||
end
|
||||
super
|
||||
end
|
||||
|
||||
|
@ -67,6 +64,10 @@ module Fog
|
|||
|
||||
private
|
||||
|
||||
def attachmentSet=(new_attachment_set)
|
||||
merge_attributes(new_attachment_set.first || {})
|
||||
end
|
||||
|
||||
def attach(new_server)
|
||||
if new_record?
|
||||
@server = new_server
|
||||
|
|
Loading…
Add table
Reference in a new issue