Skip to content

Commit 787cec0

Browse files
committed
- fixes #84
- making sure a list of strings is not treated as an array of arrays
1 parent 7fe7e72 commit 787cec0

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drf_excel/fields.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -160,7 +160,7 @@ def __init__(self, list_sep, **kwargs):
160160
super().__init__(**kwargs)
161161

162162
def prep_value(self) -> Any:
163-
if len(self.value) > 0 and isinstance(self.value[0], Iterable):
163+
if len(self.value) > 0 and isinstance(self.value[0], Iterable) and not isinstance(self.value[0], str):
164164
# array of array; write as json
165165
return json.dumps(self.value, ensure_ascii=False)
166166
else:

0 commit comments

Comments
 (0)