Hello,

I have faced the problem because I lack understanding of the logic behind:  

There are 2 serializers CreateSerializer(child) and 
BulkCreateSerializer(parent). They are connected via list_serializer_class. 
I have overridden create() and validate() methods for both serializers and 
expect them to trigger respectively on whether a single instance is coming 
via POST or a list of instances.

However, when I am sending a post request with a list of instances 
serializer does switch to many=true but uses validate() that belongs to 
child CreateSerializer instead of dedicated BulkCreateSerializer, which 
runs me into errors of course.

So my question is, what could be the logic under the hood, that prevents my 
serializers to distribute the items for validation respectively? And how to 
make it work that way?

Please see the opened question on StackOverflow with the code examples 
provided:

https://stackoverflow.com/questions/69030259/django-drf-serializer-with-many-true-missuses-the-respective-validate

-- 
You received this message because you are subscribed to the Google Groups 
"Django REST framework" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-rest-framework+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-rest-framework/4e090a11-cfd5-409b-a1d7-15bfd75c1a42n%40googlegroups.com.

Reply via email to