From c101ab7c519497f8767dcfbb6957260e55428caa Mon Sep 17 00:00:00 2001 From: Chris Laffra Date: Sat, 23 Nov 2024 23:12:59 +0100 Subject: [PATCH] Fix ModelAttribute serialization --- ltk/widgets.py | 2 +- pyproject.toml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/ltk/widgets.py b/ltk/widgets.py index 1de3c37..4e7706f 100644 --- a/ltk/widgets.py +++ b/ltk/widgets.py @@ -460,7 +460,7 @@ def decode(self, json_encoding: str): def encode(self): """ Encode the model as JSON """ return json.dumps({ - name: value.get() + name: value.get_value() for name, value in self.__dict__.items() if isinstance(value, ModelAttribute) }) diff --git a/pyproject.toml b/pyproject.toml index 38214dc..afa4e85 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -6,7 +6,7 @@ build-backend = "setuptools.build_meta" [project] name = "pyscript-ltk" -version = "0.2.3" +version = "0.2.4" description = "A little toolkit for writing UIs in PyScript" readme = "README.md" authors = [{ name = "Chris Laffra", email = "chris@chrislaffra.com" }]