diff --git a/ckanext/spatial/harvesters/base.py b/ckanext/spatial/harvesters/base.py index 2d6aec7..017d722 100644 --- a/ckanext/spatial/harvesters/base.py +++ b/ckanext/spatial/harvesters/base.py @@ -673,7 +673,12 @@ class SpatialHarvester(HarvesterBase): ''' if self._user_name: return self._user_name - self._site_user = p.toolkit.get_action('get_site_user')({'model': model, 'ignore_auth': True}, {}) + + context = {'model': model, + 'ignore_auth': True, + 'defer_commit': True, # See ckan/ckan#1714 + } + self._site_user = p.toolkit.get_action('get_site_user')(context, {}) config_user_name = config.get('ckanext.spatial.harvest.user_name') if config_user_name: