Incorrect validator_kwarg filtering for django GenericIPAddressField #8766
Unanswered
IgoryanM
asked this question in
Potential Issue
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
When mapping django
GenericIPAddressField
excludes onlyvalidate_ipv46_address function
.If protocol is defined, ipv4 for example, in django field, function
validate_ipv4_address
will be added tovalidator_kwarg
.Then when initiating rest
IPAddressField
self.validators
will havevalidate_ipv4_address
andvalidate_ipv46_address
. Then we have two validations and two messages about same error.Additionally will be good to get protocol arg from django
GenericIPAddressField
to restIPAddressField
.django-rest-framework/rest_framework/utils/field_mapping.py
Lines 183 to 188 in df60510
Beta Was this translation helpful? Give feedback.
All reactions