From 74a0e27a8c64f99ed4a0ebe1a0c4764a1ae2e4f0 Mon Sep 17 00:00:00 2001 From: Jens Langhammer Date: Fri, 14 Oct 2022 14:31:44 +0200 Subject: [PATCH] blueprints: fix error when exporting objects with lazily translated strings closes #3482 Signed-off-by: Jens Langhammer --- authentik/blueprints/v1/common.py | 1 + 1 file changed, 1 insertion(+) diff --git a/authentik/blueprints/v1/common.py b/authentik/blueprints/v1/common.py index 8fa77ffa6..8eb020998 100644 --- a/authentik/blueprints/v1/common.py +++ b/authentik/blueprints/v1/common.py @@ -227,6 +227,7 @@ class BlueprintDumper(SafeDumper): self.add_representer(UUID, lambda self, data: self.represent_str(str(data))) self.add_representer(OrderedDict, lambda self, data: self.represent_dict(dict(data))) self.add_representer(Enum, lambda self, data: self.represent_str(data.value)) + self.add_representer(None, lambda self, data: self.represent_str(str(data))) def represent(self, data) -> None: if is_dataclass(data):