From 8f9e9e154dcb49f77eee7c2947d6636971915278 Mon Sep 17 00:00:00 2001 From: anonymous <anonymous> Date: Mon, 10 Dec 2018 10:53:24 +0100 Subject: [PATCH] Fixes wrong instantiation of ValidationError in icap virus check. --- ckanext/odsh/lib/uploader.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/ckanext/odsh/lib/uploader.py b/ckanext/odsh/lib/uploader.py index 8064be53..a266637f 100644 --- a/ckanext/odsh/lib/uploader.py +++ b/ckanext/odsh/lib/uploader.py @@ -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: -- GitLab