mirror of
https://github.com/django/django.git
synced 2025-07-25 06:04:21 +00:00
Fixed #24727 -- Prevented ClearableFileInput from masking exceptions on Python 2
This commit is contained in:
parent
7424ad0774
commit
043383e3f3
2 changed files with 40 additions and 1 deletions
|
@ -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):
|
||||
"""
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue