From 28a80f42b329112c90e750c1736797029afc7888 Mon Sep 17 00:00:00 2001 From: Toby Date: Mon, 27 Feb 2012 10:53:29 +0000 Subject: [PATCH] accept old style check_data_dict calls in update --- ckan/logic/action/update.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/ckan/logic/action/update.py b/ckan/logic/action/update.py index 9a1ca8955f7..c466d71e5ab 100644 --- a/ckan/logic/action/update.py +++ b/ckan/logic/action/update.py @@ -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)