Fixed #24727 -- Prevented ClearableFileInput from masking exceptions on Python 2

This commit is contained in:
Berker Peksag 2016-02-14 23:28:26 +02:00
parent 7424ad0774
commit 043383e3f3
2 changed files with 40 additions and 1 deletions

View file

@ -372,7 +372,7 @@ class ClearableFileInput(FileInput):
"""
Return whether value is considered to be initial value.
"""
return bool(value and hasattr(value, 'url'))
return bool(value and getattr(value, 'url', False))
def get_template_substitution_values(self, value):
"""