From a479d0c0ee2048cd108dcf9962c897364d177338 Mon Sep 17 00:00:00 2001 From: Ferdinand Thiessen Date: Sat, 27 Nov 2021 03:05:05 +0100 Subject: [PATCH] [models] Add __str__ function for all serialized models (for debug) --- flaschengeist/models/__init__.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/flaschengeist/models/__init__.py b/flaschengeist/models/__init__.py index 339a598..d739b88 100644 --- a/flaschengeist/models/__init__.py +++ b/flaschengeist/models/__init__.py @@ -39,6 +39,9 @@ class ModelSerializeMixin: key, value = d.popitem() return value return d + + def __str__(self) -> str: + return self.serialize().__str__() class Serial(TypeDecorator):