forked from platypush/platypush
[linode] Small bug fix on schema deserialization.
This commit is contained in:
parent
3543052c11
commit
84a5eeb86a
1 changed files with 4 additions and 1 deletions
|
@ -67,11 +67,14 @@ class LinodePlugin(RunnablePlugin, CloudInstanceEntityManager, EnumSwitchEntityM
|
||||||
return instances[0]
|
return instances[0]
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
def _expand_mapped_objects(cls, data: dict) -> dict:
|
def _expand_mapped_objects(cls, data) -> dict:
|
||||||
"""
|
"""
|
||||||
Expand the mapped objects in a :class:`linode_api4.Instance` to
|
Expand the mapped objects in a :class:`linode_api4.Instance` to
|
||||||
dictionaries.
|
dictionaries.
|
||||||
"""
|
"""
|
||||||
|
if not isinstance(data, dict):
|
||||||
|
return data
|
||||||
|
|
||||||
for key, value in data.items():
|
for key, value in data.items():
|
||||||
if isinstance(value, objects.MappedObject):
|
if isinstance(value, objects.MappedObject):
|
||||||
value = data[key] = value.dict
|
value = data[key] = value.dict
|
||||||
|
|
Loading…
Reference in a new issue