Skip to content

Commit 4f04344

Browse files
committed
remove serialize_nested
serialize_nested cause a differece between generated datastructure and actual json serialised datastructure. Removing to resolve it.
1 parent 987ccc2 commit 4f04344

1 file changed

Lines changed: 0 additions & 11 deletions

File tree

packages/open_vp_cal/src/open_vp_cal/project_settings.py

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,6 @@
2828
field_validator,
2929
field_serializer,
3030
model_validator,
31-
model_serializer,
3231
PrivateAttr,
3332
ConfigDict,
3433
)
@@ -128,16 +127,6 @@ def handle_nested_format(cls, data: Any) -> Any:
128127
return inner
129128
return data
130129

131-
@model_serializer(mode='wrap')
132-
def serialize_nested(self, handler) -> dict:
133-
"""Output backwards-compatible nested JSON format."""
134-
data = handler(self)
135-
version = data.pop('openvp_cal_version', open_vp_cal.__version__)
136-
return {
137-
constants.OpenVPCalSettingsKeys.VERSION: version,
138-
constants.OpenVPCalSettingsKeys.PROJECT_SETTINGS: data
139-
}
140-
141130
def __init__(self, led_wall_class: Optional[Type[LedWallSettings]] = None, **data):
142131
"""Initialize a ProjectSettings object.
143132

0 commit comments

Comments
 (0)