Fix empty object returned by successful response
Return of objects like capacity and allocatable were returning an empty object. Fix deserialize method and pass the corresponding value. Change-Id: Ia55d01a7cfd6e11448272e5859dd84e40147b618 Closes-Bug: #1595373
This commit is contained in:
parent
53bd248930
commit
c18bd6f247
@ -275,7 +275,7 @@ class ApiClient(object):
|
||||
if klass in [int, float, str, bool]:
|
||||
return self.__deserialize_primitive(data, klass)
|
||||
elif klass == object:
|
||||
return self.__deserialize_object()
|
||||
return self.__deserialize_object(data)
|
||||
elif klass == date:
|
||||
return self.__deserialize_date(data)
|
||||
elif klass == datetime:
|
||||
@ -500,13 +500,13 @@ class ApiClient(object):
|
||||
value = data
|
||||
return value
|
||||
|
||||
def __deserialize_object(self):
|
||||
def __deserialize_object(self, value):
|
||||
"""
|
||||
Deserializes empty object.
|
||||
Return the original value.
|
||||
|
||||
:return: object.
|
||||
"""
|
||||
return object()
|
||||
return value
|
||||
|
||||
def __deserialize_date(self, string):
|
||||
"""
|
||||
|
Loading…
Reference in New Issue
Block a user