Skip to content

Commit

Permalink
Fix a db_to_form_package_schema() crash
Browse files Browse the repository at this point in the history
When db_to_form_package_schema() was in use (e.g. when an IDatasetForm
plugin with a db_to_form_schema() method based on
db_to_form_package_schema() was active) then try to edit a package that
has some resources would crash with a 400 Bad Request.

Extremely difficult to debug.

This seems to fix it.
  • Loading branch information
Sean Hammond committed Aug 10, 2012
1 parent 8938352 commit 5d30fdb
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions ckan/logic/schema.py
Expand Up @@ -195,6 +195,7 @@ def db_to_form_package_schema():
# TODO: Fix this elsewhere so we don't need to workaround it here.
schema['resources'].update({
'created': [ckan.lib.navl.validators.ignore_missing],
'position': [not_empty],
'last_modified': [ckan.lib.navl.validators.ignore_missing],
'cache_last_updated': [ckan.lib.navl.validators.ignore_missing],
'webstore_last_updated': [ckan.lib.navl.validators.ignore_missing],
Expand Down

0 comments on commit 5d30fdb

Please sign in to comment.