[linode] Small bug fix on schema deserialization.

This commit is contained in:
Fabio Manganiello 2024-10-21 23:42:24 +02:00
parent 3543052c11
commit 84a5eeb86a
Signed by untrusted user: blacklight
GPG key ID: D90FBA7F76362774

View file

@ -67,11 +67,14 @@ class LinodePlugin(RunnablePlugin, CloudInstanceEntityManager, EnumSwitchEntityM
return instances[0]
@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
dictionaries.
"""
if not isinstance(data, dict):
return data
for key, value in data.items():
if isinstance(value, objects.MappedObject):
value = data[key] = value.dict