updates serializer and state_manager to deal with serialized methods

I need to get the access path from methods when generating the
web_settings.json file. Thus, methods will not be skipped anymore,
instead, the method checking if the attribute is loadable makes the
distinction.
This commit is contained in:
Mose Müller 2023-12-21 10:30:59 +01:00
parent 9d90fd2b81
commit ef36c01407
2 changed files with 3 additions and 3 deletions

View File

@ -276,5 +276,8 @@ class StateManager:
self.cache, full_access_path
)
if cached_serialization_dict["value"] == "method":
return False
# nested objects cannot be loaded
return not serialized_dict_is_nested_object(cached_serialization_dict)

View File

@ -363,9 +363,6 @@ def generate_serialized_data_paths(
paths: list[str] = []
for key, value in data.items():
if value["type"] == "method":
# ignoring methods
continue
new_path = f"{parent_path}.{key}" if parent_path else key
paths.append(new_path)
if serialized_dict_is_nested_object(value):