umutbozkurt / django-rest-framework-mongoengine

Mongoengine support for Django Rest Framework
MIT License
616 stars 167 forks source link

NullBooleanField is deprecated in favor of BooleanField(allow_null=True) #280

Open nikolaik opened 3 years ago

nikolaik commented 3 years ago

With djangorestframework>=3.12 we can now observe the following warning:

(...)/site-packages/rest_framework_mongoengine/serializers.py:355: RemovedInDRF314Warning: The `NullBooleanField` is deprecated and will be removed starting with 3.14. Instead use the `BooleanField` field and set `allow_null=True` which does the same thing.
    fields[field_name] = field_class(**field_kwargs)

See the corresponding PR in DRF here https://github.com/encode/django-rest-framework/pull/7122