Skip to content

Commit

Permalink
[#1400] belt and suspenders
Browse files Browse the repository at this point in the history
  • Loading branch information
wardi committed Dec 19, 2013
1 parent 91b3a39 commit d4f9073
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions ckan/lib/plugins.py
Expand Up @@ -165,9 +165,10 @@ def plugin_validate(plugin, context, data_dict, schema, action):
Backwards compatibility with 2.x dataset group and org plugins:
return a default validate method if one has not been provided.
"""
result = plugin.validate(context, data_dict, schema, action)
if result is not None:
return result
if hasattr(plugin, 'validate'):
result = plugin.validate(context, data_dict, schema, action)
if result is not None:
return result

return toolkit.navl_validate(data_dict, schema, context)

Expand Down

0 comments on commit d4f9073

Please sign in to comment.