From f10fd5e1eb2895e72c5092441fe00aba0f33456e Mon Sep 17 00:00:00 2001 From: bart-maykin Date: Fri, 9 Aug 2024 01:51:29 +0200 Subject: [PATCH] :bug: [#208] fixed bug where expand documentation would show dict instead of list of dict --- src/openklant/components/utils/schema.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/openklant/components/utils/schema.py b/src/openklant/components/utils/schema.py index 1d66de4d..b7972366 100644 --- a/src/openklant/components/utils/schema.py +++ b/src/openklant/components/utils/schema.py @@ -55,7 +55,12 @@ def get_expand_response(self, serializer, base_response, direction): inclusion_ref = self.resolve_serializer(inclusion_serializer, direction).ref - many = True if hasattr(inclusion_field, "child_relation") else False + many = ( + True + if hasattr(inclusion_field, "child_relation") + or hasattr(inclusion_field, "many") + else False + ) if many: inclusion_schema = append_meta(build_array_type(inclusion_ref), meta) else: