Skip to content

Remove usage of depreciated NullBooleanField for drf 3.14.0#65

Merged
FlipperPA merged 1 commit intodjango-commons:mainfrom
sarahboyce:drf_3_14_0_support
Sep 30, 2022
Merged

Remove usage of depreciated NullBooleanField for drf 3.14.0#65
FlipperPA merged 1 commit intodjango-commons:mainfrom
sarahboyce:drf_3_14_0_support

Conversation

@sarahboyce
Copy link
Copy Markdown
Contributor

@sarahboyce sarahboyce commented Sep 23, 2022

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 👍

Thank you for the package ❤️ @FlipperPA

@FlipperPA
Copy link
Copy Markdown
Member

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

@sarahboyce
Copy link
Copy Markdown
Contributor Author

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

@FlipperPA FlipperPA merged commit d4f1a36 into django-commons:main Sep 30, 2022
@FlipperPA
Copy link
Copy Markdown
Member

Thank you, @sarahboyce!

@FlipperPA
Copy link
Copy Markdown
Member

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

Successfully merging this pull request may close these issues.

2 participants