-
-
Notifications
You must be signed in to change notification settings - Fork 6.9k
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
Contradictory read_only
and required
arguments on a m2m through field with uniqueness constraint.
#2813
Comments
Okay. Presumably the end result of that is that you'll always have a validation error for that field stating that: "this field is required", right? |
You should be able to get rid of the constraint by override the contraint. I wrote a mail about this yesterday on the mailing list. |
If anyone's able to search through the list and then link through to past discussion on this that'd help progress this issue. |
read_only
and required
arguments on a m2m through field with uniqueness constraint.
Note to self that #2882 is not the same as this issue. |
read_only
and required
arguments on a m2m through field with uniqueness constraint.read_only
and required
arguments on a m2m through field with uniqueness constraint.
Linked to #2848 ? |
@philippeluickx looks like, thanks for pointing it. |
Should now be resolved via #4192. |
If a field is made
read_only
by DRF automatically by virtue of being a relation with a through-class and the field is also maderequired
automatically by virtue of being used in a uniqueness constraint, theread_only
andrequired
arguments clash due toModelSerializer.include_extra_kwargs
only checking forread_only
inextra_kwargs
.The text was updated successfully, but these errors were encountered: