1
0
mirror of https://github.com/django/django.git synced 2025-10-31 09:41:08 +00:00

Fixed #19298 -- Added MultiValueField.__deepcopy__

Thanks nick.phillips at otago.ac.nz for the report.
This commit is contained in:
Tim Graham
2013-09-10 13:56:49 -04:00
parent d5d0e03ec8
commit 4e96dac450
2 changed files with 26 additions and 0 deletions

View File

@@ -977,6 +977,11 @@ class MultiValueField(Field):
f.required = False
self.fields = fields
def __deepcopy__(self, memo):
result = super(MultiValueField, self).__deepcopy__(memo)
result.fields = tuple([x.__deepcopy__(memo) for x in self.fields])
return result
def validate(self, value):
pass