diff options
author | Étienne Loks <etienne.loks@iggdrasil.net> | 2021-03-01 18:33:14 +0100 |
---|---|---|
committer | Étienne Loks <etienne.loks@iggdrasil.net> | 2021-03-01 18:34:48 +0100 |
commit | 2781b537fc64b454cea5c88b3e19000cf8c7cee8 (patch) | |
tree | e0c5c21b33052ce7a20e027cd29d6989637cc12f /ishtar_common/forms_common.py | |
parent | a456cce506cbbcffb86bb150540e14df26fe604b (diff) | |
download | Ishtar-2781b537fc64b454cea5c88b3e19000cf8c7cee8.tar.bz2 Ishtar-2781b537fc64b454cea5c88b3e19000cf8c7cee8.zip |
Manage corrupted image - silently fail for now
Diffstat (limited to 'ishtar_common/forms_common.py')
-rw-r--r-- | ishtar_common/forms_common.py | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/ishtar_common/forms_common.py b/ishtar_common/forms_common.py index 22a9e0279..8d57f0e3e 100644 --- a/ishtar_common/forms_common.py +++ b/ishtar_common/forms_common.py @@ -1552,9 +1552,10 @@ class DocumentForm(forms.ModelForm, CustomForm, ManageOldType): not cleaned_data.get('image', None) and \ not cleaned_data.get('associated_file', None) and \ not cleaned_data.get('associated_url', None): - raise forms.ValidationError(_("You should at least fill one of " - "this field: title, url, image or " - "file.")) + raise forms.ValidationError( + _("You should at least fill one of this field: title, url, " + "image or file. If you have provided an image check that " + "it is not corrupted.")) for rel in models.Document.RELATED_MODELS: if cleaned_data.get(rel, None): return cleaned_data |