From 8a78a510668b8a391972c47cfd318489b5166f0a Mon Sep 17 00:00:00 2001 From: Tidiane Dia Date: Wed, 8 Feb 2023 10:49:16 +0000 Subject: [PATCH] Implement __reduce__ in StructValue class --- wagtail/blocks/struct_block.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/wagtail/blocks/struct_block.py b/wagtail/blocks/struct_block.py index 9fe188e3bd..2a5824ef14 100644 --- a/wagtail/blocks/struct_block.py +++ b/wagtail/blocks/struct_block.py @@ -70,6 +70,9 @@ class StructValue(collections.OrderedDict): ] ) + def __reduce__(self): + return (self.__class__, (self.block,), None, None, iter(self.items())) + class PlaceholderBoundBlock(BoundBlock): """