From 84a5eeb86ac2e92a63c30df37bcf71e02724ca74 Mon Sep 17 00:00:00 2001 From: Fabio Manganiello Date: Mon, 21 Oct 2024 23:42:24 +0200 Subject: [PATCH] [linode] Small bug fix on schema deserialization. --- platypush/plugins/linode/__init__.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/platypush/plugins/linode/__init__.py b/platypush/plugins/linode/__init__.py index 5a3796b0c8..efc106934d 100644 --- a/platypush/plugins/linode/__init__.py +++ b/platypush/plugins/linode/__init__.py @@ -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