diff --git a/ckanext/xloader/utils.py b/ckanext/xloader/utils.py index ec8e4bbd..e504a738 100644 --- a/ckanext/xloader/utils.py +++ b/ckanext/xloader/utils.py @@ -83,6 +83,7 @@ def set_resource_metadata(update_dict): # better fix q = model.Session.query(model.Resource). \ + with_for_update(of=model.Resource). \ filter(model.Resource.id == update_dict['resource_id']) resource = q.one()