-
-
Notifications
You must be signed in to change notification settings - Fork 6.9k
@list_route post cannot return serializer(qs, many=True) #2918
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Could you provide the stack trace you're seeing when you make the POST request?
I didn't understand this - which case works, which case doesn't? |
Indeed - almost certainly due to the browsable API calling You could resolve this by either:
It's possible that we could try to guard against this kind of case more gracefully, but I don't see it as sufficiently worth prioritizing so I'm going to close this off for now. |
@tomchristie I'm trying to modify
|
+1 |
I have a
@list_route
that look like thisbut 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 fineMy serializer class is a normal class that extends form ModelSerializer
The text was updated successfully, but these errors were encountered: