Ticket #12106: patch.txt

File patch.txt, 540 bytes (added by etianen, 5 years ago)
Line 
1Index: django/forms/fields.py
2===================================================================
3--- django/forms/fields.py      (revision 11679)
4+++ django/forms/fields.py      (working copy)
5@@ -454,7 +454,7 @@
6         super(FileField, self).__init__(*args, **kwargs)
7 
8     def clean(self, data, initial=None):
9-        super(FileField, self).clean(initial or data)
10+        data = super(FileField, self).clean(data or initial)
11         if not self.required and data in EMPTY_VALUES:
12             return None
13         elif not data and initial:
Back to Top