Ticket #2896 (new defect)

Opened 20 months ago

resource_create crashes on ValidationErrors with KeyError: 'resources'

Reported by: seanh Owned by:
Priority: awaiting triage Milestone: ckan-v1.8.1
Component: ckan Keywords:
Cc: Repository: ckan
Theme: none

Description

ckan/logic/action/create.py:resource_create():

try:

pkg_dict = _get_action('package_update')(context, pkg_dict)

except ValidationError?, e:

errors = e.error_dictresources?[-1] raise ValidationError?(errors)

This assumes that package_update always returns an error dict with 'resources' in it. This assumption doesn't hold.

Note: See TracTickets for help on using tickets.