Skip to content

Commit

Permalink
accept old style check_data_dict calls in update
Browse files Browse the repository at this point in the history
  • Loading branch information
tobes committed Feb 27, 2012
1 parent a264922 commit 28a80f4
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion ckan/logic/action/update.py
Expand Up @@ -179,7 +179,12 @@ def package_update(context, data_dict):
schema = package_plugin.form_to_db_schema()

if 'api_version' not in context:
package_plugin.check_data_dict(data_dict, schema)
# old plugins do not support passing the schema so we need
# to ensure they still work
try:
package_plugin.check_data_dict(data_dict, schema)
except TypeError:
package_plugin.check_data_dict(data_dict)

data, errors = validate(data_dict, schema, context)

Expand Down

0 comments on commit 28a80f4

Please sign in to comment.