-
Notifications
You must be signed in to change notification settings - Fork 299
Fixes unhashable type OrderedDict error exposed by DRF 3.4.4 #269
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
Conversation
@jerel I am assuming this change was causing the issue? encode/django-rest-framework@3.4.3...3.4.4#diff-9bc5ef9dafcb145b81a6d228c8200fc6L159
@scottfisk yeah, due to that naming change get_choices
was being called on the base class rather than our version (choices
). And we are serializing {'type': 'foo', 'id': '1'}
to json since it's not a simple pk
so just returning to_representation
caused an Unhashable type: OrderedDict
to be thrown.
So, my fix is to remove @property choices
and let the base class cache that (all it does is call get_choices
)
lgtm 👍
No description provided.