Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

AttributeError: module 'rest_framework.serializers' has no attribute 'NullBooleanField'. Did you mean: 'BooleanField'? #8668

Closed
AminBidad1 opened this issue Sep 23, 2022 · 5 comments

Comments

@AminBidad1
Copy link

AminBidad1 commented Sep 23, 2022

in the latest version of djangorestframework (3.14.0) NullBooleanField was removed.
but drf-yasg library uses from NullBooleanField
so it will raise the error:
AttributeError: module 'rest_framework.serializers' has no attribute 'NullBooleanField'. Did you mean: 'BooleanField'?
how can I solve it ?

@fagnerzulin
Copy link

I had the same problem when running lint in the project in this new version.
AttributeError: module 'rest_framework.serializers' has no attribute 'NullBooleanField'. Did you mean: 'BooleanField'?

@miko13
Copy link

miko13 commented Sep 23, 2022

this is addressed in the latest release of drf-spectacular so you just need to update to 0.24.1

@AminBidad1
Copy link
Author

AminBidad1 commented Sep 23, 2022

this is addressed in the latest release of drf-spectacular so you just need to update to 0.24.1

thank you for your suggestion.
but I wanna use the main djangorestframework and drf-yasg library.
not any other way?

@Viicos
Copy link
Contributor

Viicos commented Sep 24, 2022

You'll have to wait for axnsan12/drf-yasg#811 to get merged.

@AminBidad1
Copy link
Author

You'll have to wait for axnsan12/drf-yasg#811 to get merged.

thank you for your guidance.

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

No branches or pull requests

5 participants