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
AttributeError: 'OrderedDict' object has no attribute 'pk' #2964
Comments
The serializer.data property is only valid if you have a saved instance to serializer. |
I encountered this as well using the detail_route decorator for a similar purpose. Took a long time to figure out what was going on. It would be helpful if there was a guard against this that stated your previous response of |
@tomchristie The current error here is while accessing the Edited. |
Question is: do we want |
views:
serializers:
When I try and print the serializer:
So whenever I try and access serializer.data I get an exception:
AttributeError: 'OrderedDict' object has no attribute 'pk'
The text was updated successfully, but these errors were encountered: