mirror of
https://github.com/fog/fog.git
synced 2022-11-09 13:51:43 -05:00
[zerigo|dns] Fixed an issue with updating a record since the response body is an empty string, not nil.
This commit is contained in:
parent
f07e59472f
commit
6cd10c1430
1 changed files with 7 additions and 5 deletions
|
@ -44,19 +44,21 @@ module Fog
|
|||
options[:notes] = description if description
|
||||
options[:priority] = priority if priority
|
||||
options[:ttl] = ttl if ttl
|
||||
data = unless identity
|
||||
connection.create_host(@zone.id, type, value, options)
|
||||
else
|
||||
|
||||
if identity
|
||||
options[:host_type] = type
|
||||
options[:data] = value
|
||||
connection.update_host(identity, options)
|
||||
else
|
||||
data = connection.create_host(@zone.id, type, value, options)
|
||||
merge_attributes(data.body)
|
||||
end
|
||||
merge_attributes(data.body)
|
||||
|
||||
true
|
||||
end
|
||||
|
||||
private
|
||||
|
||||
|
||||
def zone=(new_zone)
|
||||
@zone = new_zone
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue