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: