mirror of
https://github.com/encode/django-rest-framework.git
synced 2025-08-05 04:50:12 +03:00
Merge 56f53a48bf
into 9c9525b130
This commit is contained in:
commit
11d78d7ca2
|
@ -534,6 +534,9 @@ class Field(object):
|
||||||
errors = []
|
errors = []
|
||||||
for validator in self.validators:
|
for validator in self.validators:
|
||||||
if hasattr(validator, 'set_context'):
|
if hasattr(validator, 'set_context'):
|
||||||
|
# Need to make a copy, because validator instances often
|
||||||
|
# are initialised globally
|
||||||
|
validator = copy.deepcopy(validator)
|
||||||
validator.set_context(self)
|
validator.set_context(self)
|
||||||
|
|
||||||
try:
|
try:
|
||||||
|
|
Loading…
Reference in New Issue
Block a user