Skip to content
Snippets Groups Projects
Commit 8f9e9e15 authored by anonymous's avatar anonymous
Browse files

Fixes wrong instantiation of ValidationError in icap virus check.

parent 67c100e8
Branches
Tags
No related merge requests found
......@@ -6,14 +6,13 @@ import logging
log = logging.getLogger(__name__)
ValidationError = logic.ValidationError
class ODSHResourceUpload(ResourceUpload):
def __init__(self, resource):
super(ODSHResourceUpload, self).__init__(resource)
if self._icap_virus_found():
raise ValidationError(['Virus gefunden'])
raise logic.ValidationError({'upload': ['Virus gefunden']})
def _icap_virus_found(self):
if self.filename and self.upload_file:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment