django-commons / drf-excel

An XLSX spreadsheet renderer for Django REST Framework.
BSD 3-Clause "New" or "Revised" License
217 stars 40 forks source link

Remove usage of depreciated NullBooleanField for drf 3.14.0 #65

Closed sarahboyce closed 2 years ago

sarahboyce commented 2 years ago

There is a new drf release https://www.django-rest-framework.org/community/release-notes/#3140 Here NullBooleanField is no longer available and so I removed the one reference to allow support for drf 3.14.0

It was also not required as the isinstance(field, BooleanField) would return true for a NullBooleanFIeld due to object inheritance:

>>> from rest_framework.fields import NullBooleanField
>>> field = NullBooleanField()
>>> from rest_framework.fields import BooleanField
>>> isinstance(field, BooleanField)
True
>>> 

So I think we should be good :+1:

Thank you for the package :heart: @FlipperPA

FlipperPA commented 2 years ago

Thank you, @sarahboyce - I will take a look at this today.

sarahboyce commented 2 years ago

Thank you @FlipperPA 🎉 Let me know if you need anything from me 👍

FlipperPA commented 2 years ago

Thank you, @sarahboyce!

FlipperPA commented 2 years ago

Thank you! This has been published to PyPI at 2.2.0:

https://github.com/wharton/drf-excel/releases/tag/2.2.0

https://pypi.org/project/drf-excel/2.2.0/