Skip to content
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

HStoreSerializer breaks nullbooleanfield #10

Open
mc-multi-it-dk opened this issue May 4, 2016 · 0 comments
Open

HStoreSerializer breaks nullbooleanfield #10

mc-multi-it-dk opened this issue May 4, 2016 · 0 comments

Comments

@mc-multi-it-dk
Copy link

File "/home/max/git/upgrades/env/lib/python2.7/site-packages/rest_framework/fields.py", line 643, in init
assert 'allow_null' not in kwargs, 'allow_null is not a valid option.'
AssertionError: allow_null is not a valid option.

solution:
changed line 39 in serializers.py
from:
if model_field.null:
to:
if model_field.null and not isinstance(model_field, models.NullBooleanField):

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant