Skip to content

Commit

Permalink
[#473] datastore_create should rely on a valid context
Browse files Browse the repository at this point in the history
Otherwise errors occur when doing a deep copy of the context in validate
  • Loading branch information
domoritz committed Feb 27, 2013
1 parent 0a6411e commit c229bc4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion ckanext/datastore/logic/action.py
Expand Up @@ -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')
Expand Down

0 comments on commit c229bc4

Please sign in to comment.