-
-
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
Always defer to explicit overrides. #4198
Milestone
Comments
This already happens, a declared field will not be re-declared with new args.
A default of None on a declared field will work for uniqueness validation. |
Thanks for those confirmations @gcbirzan! |
gcbirzan
pushed a commit
to gcbirzan/django-rest-framework
that referenced
this issue
Jun 15, 2016
- Raise exception if field is defined on the class and present in extra_kwargs or read_only_fields - Do not overwrite options specified in extra_kwargs in get_uniqueness_extra_kwargs
Closed
gcbirzan
pushed a commit
to gcbirzan/django-rest-framework
that referenced
this issue
Jun 15, 2016
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Some of these may already be covered, but we should make sure that all the following are satisfied:
extra_kwargs
then warn/error.read_only_fields
then warn/error.get_uniqueness_extra_kwargs
to override a declared field.get_uniqueness_extra_kwargs
to override a flag that has been set inextra_kwargs
.default
, then ensure that uniqueness validators use that for empty, rather than forcingrequired=True
The text was updated successfully, but these errors were encountered: