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

Merge pull request #1852 from jasonamyers/cleanup/PEP8

Cleanup/pep8 tests
This commit is contained in:
Alex Gaynor
2013-11-03 09:51:49 -08:00
241 changed files with 1631 additions and 290 deletions

View File

@@ -387,7 +387,8 @@ class ClearableFileInput(FileInput):
def value_from_datadict(self, data, files, name):
upload = super(ClearableFileInput, self).value_from_datadict(data, files, name)
if not self.is_required and CheckboxInput().value_from_datadict(
data, files, self.clear_checkbox_name(name)):
data, files, self.clear_checkbox_name(name)):
if upload:
# If the user contradicts themselves (uploads a new file AND
# checks the "clear" checkbox), we return a unique marker