[ckan-dev] package_create url validation

Ian Ward ian at excess.org
Thu Dec 4 12:58:06 UTC 2014


On Thu, Dec 4, 2014 at 5:45 AM, Milo Thurston
<milo.thurston at oerc.ox.ac.uk> wrote:
> {'extras': [{'key': ’source',
>              'value': 'http://www.mysite.org/original-data'}],
>  'name': 'Training Materials',
>  'owner_org': ‘mysite',
>  'url': '4c90b3c7-d8fa-4b9d-a02b-c11eedc4970a’}
>
> CKAN gives a 409 error and puts this in the logs:
>
> ERROR [ckan.controllers.api] Validation error: "{'__type': 'Validation Error', 'name': [u'Url must be purely lowercase alphanumeric (ascii) characters and these symbols: -_']}”

This is just a bad error message. The error is being generated on the
field 'name' not 'url'. The message should say "Must be purely
lowercase..." not "Url must be purely lowercase..."



More information about the ckan-dev mailing list