-
-
Notifications
You must be signed in to change notification settings - Fork 6.8k
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
required: True
set on a nullable field which is included in combined_unique
#8273
Comments
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
Closing valid tickets is not solving them |
that stale bot is annoying but it is also sending me notification for looking into so called stalled issues :D |
It is already a deprecated feature in django and DRF still do not support it properly. but if you can send an improvement request it would great |
For this ticket, I don’t remember why I found it and subscribed to it. One project had an issue that was solved by django adding Maybe this one is stale and won’t fix! |
Checklist
My Model:
This definition implies
f1
andf2
should combinedly be unique whenf3
isnull
, butModelSerializer.get_uniqueness_extra_kwargs
marks all fields inunique_together
asrequired: True
Suggestion:
Ignore marking the fields as
required: True
when there are more than 2 fields inunique_together
Temporary fix
adding
default=None
onf3
currently bypasses addingrequired: True
on itThe text was updated successfully, but these errors were encountered: