-
Notifications
You must be signed in to change notification settings - Fork 440
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
Add checker for allow_null attr #688
Conversation
Check for allow_null attribute
src/drf_yasg/inspectors/base.py
Outdated
instance_kwargs['x_nullable'] = True | ||
|
||
if hasattr(field, 'allow_null'): | ||
if field.allow_null: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
you can simplify these two ifs:
if getattr(field, 'allow_null', None):
instance_kwargs['x_nullable'] = True
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Updated. thanks.
Please merge this 👍 it's basically not usable with Serpy Serializers. #687 |
Hey, would it be possible to merge this pull request or are there any other issues that need to be fixed? |
@d3QUone Can we get this merged? My code can't pass OpenAPI2.0 without it |
I think yes, it's fine. But only project collaborators have access to merge.. |
Hi It's still pending to merge @krectra could you take a look at it!. Thanks |
Pending workflow approval |
fixes for error occurring on serpy serializers