diff --git a/ckan/views/resource.py b/ckan/views/resource.py index cb03b5c2f4f..51d34aea6df 100644 --- a/ckan/views/resource.py +++ b/ckan/views/resource.py @@ -234,10 +234,8 @@ def post(self, package_type: str, id: str) -> Union[str, Response]: _(u'The dataset {id} could not be found.').format(id=id) ) except ValidationError as e: - errors = cast( - "list[ErrorDict]", e.error_dict.get('resources', [{}]))[-1] error_summary = e.error_summary - return self.get(package_type, id, data, errors, error_summary) + return self.get(package_type, id, {}, e.error_dict, error_summary) return h.redirect_to(u'{}.read'.format(package_type), id=id) data[u'package_id'] = id