From 1951e48d5c4d61dc036c1d4c5f300cc7b48ad025 Mon Sep 17 00:00:00 2001 From: Kaive Young Date: Fri, 24 Mar 2023 17:45:40 +0800 Subject: [PATCH] Update fields.py Fix others iterable type in fields.List --- flask_restx/fields.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/flask_restx/fields.py b/flask_restx/fields.py index 97957f7f..2526fa9d 100644 --- a/flask_restx/fields.py +++ b/flask_restx/fields.py @@ -323,6 +323,9 @@ def format(self, value): if isinstance(value, set): value = list(value) + if not isinstance(value, list) and hasattr(value, "__iter__"): + value = [i for i in value] + is_nested = isinstance(self.container, Nested) or type(self.container) is Raw def is_attr(val):