From c229bc47685742a787866c10f9c0581ef51975b6 Mon Sep 17 00:00:00 2001 From: Dominik Moritz Date: Wed, 27 Feb 2013 19:11:58 +0100 Subject: [PATCH] [#473] datastore_create should rely on a valid context Otherwise errors occur when doing a deep copy of the context in validate --- ckanext/datastore/logic/action.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ckanext/datastore/logic/action.py b/ckanext/datastore/logic/action.py index 1b4d323e7f2..d7638080b33 100644 --- a/ckanext/datastore/logic/action.py +++ b/ckanext/datastore/logic/action.py @@ -44,7 +44,7 @@ def datastore_create(context, data_dict): See :ref:`fields` and :ref:`records` for details on how to lay out records. ''' - model = _get_or_bust(context, 'model') + model = context.get('model') if 'id' in data_dict: data_dict['resource_id'] = data_dict['id'] res_id = _get_or_bust(data_dict, 'resource_id')