mirror of
https://github.com/encode/django-rest-framework.git
synced 2024-11-23 01:57:00 +03:00
Copy model field validators, don't reuse the same list.
This commit is contained in:
parent
8933bc4b14
commit
7d70e56ce3
|
@ -59,7 +59,7 @@ def get_field_kwargs(field_name, model_field):
|
||||||
Creates a default instance of a basic non-relational field.
|
Creates a default instance of a basic non-relational field.
|
||||||
"""
|
"""
|
||||||
kwargs = {}
|
kwargs = {}
|
||||||
validator_kwarg = model_field.validators
|
validator_kwarg = list(model_field.validators)
|
||||||
|
|
||||||
# The following will only be used by ModelField classes.
|
# The following will only be used by ModelField classes.
|
||||||
# Gets removed for everything else.
|
# Gets removed for everything else.
|
||||||
|
|
Loading…
Reference in New Issue
Block a user