djangonauts / django-rest-framework-hstore

Django Rest Framework tools for django-hstore
MIT License
75 stars 15 forks source link

HStoreSerializer breaks nullbooleanfield #10

Open mc-multi-it-dk opened 8 years ago

mc-multi-it-dk commented 8 years ago

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):