mirror of
https://github.com/fog/fog.git
synced 2022-11-09 13:51:43 -05:00
Avoids Fog::Compute::Joyent::Real#decode_time_attrs raising an exception when an empty string is returned as created or updated property
This commit is contained in:
parent
2ef483c89e
commit
386e63855d
1 changed files with 2 additions and 2 deletions
|
@ -201,8 +201,8 @@ module Fog
|
|||
|
||||
def decode_time_attrs(obj)
|
||||
if obj.kind_of?(Hash)
|
||||
obj["created"] = Time.parse(obj["created"]) if obj["created"]
|
||||
obj["updated"] = Time.parse(obj["updated"]) if obj["updated"]
|
||||
obj["created"] = Time.parse(obj["created"]) unless obj["created"].nil? or obj["created"] == ''
|
||||
obj["updated"] = Time.parse(obj["updated"]) unless obj["updated"].nil? or obj["updated"] == ''
|
||||
elsif obj.kind_of?(Array)
|
||||
obj.map do |o|
|
||||
decode_time_attrs(o)
|
||||
|
|
Loading…
Reference in a new issue