Skip to content

Commit 8a3f48a

Browse files
authored
Merge pull request #214 from open-data/open-4338
fix resource form publish error handling
2 parents b64843c + 94bc571 commit 8a3f48a

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

ckan/views/resource.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -234,10 +234,8 @@ def post(self, package_type: str, id: str) -> Union[str, Response]:
234234
_(u'The dataset {id} could not be found.').format(id=id)
235235
)
236236
except ValidationError as e:
237-
errors = cast(
238-
"list[ErrorDict]", e.error_dict.get('resources', [{}]))[-1]
239237
error_summary = e.error_summary
240-
return self.get(package_type, id, data, errors, error_summary)
238+
return self.get(package_type, id, {}, e.error_dict, error_summary)
241239
return h.redirect_to(u'{}.read'.format(package_type), id=id)
242240

243241
data[u'package_id'] = id

0 commit comments

Comments
 (0)