python - ckanext-harvest 2.0: automatically add harvested records to an organization -


https://github.com/okfn/ckanext-harvest/blob/release-v2.0/readme.rst#the-ckan-harvester mentions can specify "default_groups" config option in order have harvested records added group.

does still work in ckan 2.0? there analogous "default_organizations" config parameter?

i've tried use "default_groups" parameter putting json object form @ /harvest/edit/my-source

{ "default_groups": ["my-group"] } 

a group called "my-group" exists, i'm updating harvested packages, not creating new ones.

fetch_consumer logs:

2013-04-17 15:34:07,707 debug [ckanext.spatial.harvesters.base.import] import stage harvest object: 66b01129-bcce-4bc8-9a67-1d7ece67b998 2013-04-17 15:34:07,708 debug [ckanext.spatial.harvesters.base] using config: {u'default_groups': [u'my-group']} 2013-04-17 15:34:07,713 debug [ckanext.spatial.validation.validation] starting validation against profile(s) iso19139 2013-04-17 15:34:07,770 debug [ckanext.spatial.validation.validation] validated against "iso19139 xsd schema" 2013-04-17 15:34:07,770 info  [ckanext.spatial.validation.validation] validation passed 2013-04-17 15:34:07,898 debug [ckanext.spatial.plugin] received: u'{"type": "polygon", "coordinates": [[[-116.016, 30.5461], [-116.016, 37.5297], [-108.281, 37.5297], [-108.281, 30.5461], [-116.016, 30.5461]]]}' 2013-04-17 15:34:07,902 debug [ckanext.spatial.lib] extent package 7c5646d5-6689-49f6-94fb-0eaf54f84959 unchanged 2013-04-17 15:34:08,149 info  [ckanext.spatial.harvesters.base.import] updated package 7c5646d5-6689-49f6-94fb-0eaf54f84959 guid 4e6b8f72f7d6c3856f092c6b8501195f 

from logs, assume using spatial harvesters (eg csw). documentation pointed refers ckan-to-ckan harvester (ie harvest other ckan instances). improve docs avoid confusion.

good news spatial harvesters automatically assign new dataset same organization harvest source belongs to, there no need use configuration setting (this still needs implemented on ckan harvester). make sure define organization harvest source when creating or editing it. note see field if user logged in belongs organization.

organization field in harvest source form


Comments

Popular posts from this blog

Why does Ruby on Rails generate add a blank line to the end of a file? -

keyboard - Smiles and long press feature in Android -

node.js - Bad Request - node js ajax post -