Open ericls opened 2 months ago
Another thing to note is that
ListField
already handles it properly (in #4118 ), in fact I'm just copying what's been done toListField
toListSerializer
.
Since the use case is already handled in ListField
, I belive that it would be better having ListSerializer
raising an error if its child is not a Serializer
, suggesting to use ListField
instead.
What is the point of using ListSerialier
instead of ListField
in this case?
Description
I recently encountered some unexpected behavior when using ListSerializer when there are
None
values in the list.Here's a snippet that describes the issue and provides a way to reproduce it:
traceback:
Another thing to note is that
ListField
already handles it properly (in #4118 ), in fact I'm just copying what's been done toListField
toListSerializer
.So I think there are two issues that kinda throws me off:
.data
attribute.ListField