Skip to content

HStoreSerializer breaks nullbooleanfield #10

Open
@mc-multi-it-dk

Description

@mc-multi-it-dk

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions