Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork7k
Closed
Description
I have a@list_route that look like this
@list_route(methods=['post']) def test(self, request): queryset = self.filter_queryset(self.get_queryset()) serializer = self.get_serializer(queryset, many=True) return Response(serializer.data)but when I try to POST to .../events/test/ via browsable API
calling without browsable API is working normally.
I got exactly same error message as#2607 (ListSerializer object is not iterable)
I don't know why this happen? because I want post action to return update objects
However, if i change to this@list_route(methods=['get']) or@list_route(methods=['patch']) it is working fine
My serializer class is a normal class that extends form ModelSerializer
class EventSerializer(serializers.ModelSerializer): class Meta: model = EventMetadata
Metadata
Assignees
Labels
No labels