diff options
| author | Дилян Палаузов <Dilyan.Palauzov@db.com> | 2018-01-03 18:52:12 -0500 |
|---|---|---|
| committer | Tim Graham <timograham@gmail.com> | 2018-01-03 20:12:23 -0500 |
| commit | d7b2aa24f75434c2ce50100cfef3586071e0747a (patch) | |
| tree | 9074eb7522888e744f948c52174f367a4281c200 /django/forms/fields.py | |
| parent | c2d0f8c084456b5073252a91eeb09ab3d7453b18 (diff) | |
Fixed #28982 -- Simplified code with and/or.
Diffstat (limited to 'django/forms/fields.py')
| -rw-r--r-- | django/forms/fields.py | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/django/forms/fields.py b/django/forms/fields.py index 61f5ccfe58..2019a43c73 100644 --- a/django/forms/fields.py +++ b/django/forms/fields.py @@ -591,11 +591,7 @@ class FileField(Field): return data def has_changed(self, initial, data): - if self.disabled: - return False - if data is None: - return False - return True + return not self.disabled and data is not None class ImageField(FileField): |
