Use remote_orgs for organizations

This commit is contained in:
Stefan Oderbolz 2013-10-07 11:22:19 +02:00
parent d50eb6fca8
commit dd1acd0c6b
1 changed files with 2 additions and 2 deletions

View File

@ -297,7 +297,7 @@ class CKANHarvester(HarvesterBase):
package_dict['groups'] = validated_groups package_dict['groups'] = validated_groups
remote_orgs = self.config.get('remote_orgs', None) remote_orgs = self.config.get('remote_orgs', None)
if not remote_groups in ('only_local', 'create'): if not remote_orgs in ('only_local', 'create'):
# Ignore remote groups # Ignore remote groups
package_dict.pop('owner_org', None) package_dict.pop('owner_org', None)
else: else:
@ -315,7 +315,7 @@ class CKANHarvester(HarvesterBase):
validated_org = org['id'] validated_org = org['id']
except NotFound, e: except NotFound, e:
log.info('Organization %s is not available' % remote_org) log.info('Organization %s is not available' % remote_org)
if remote_groups == 'create': if remote_orgs == 'create':
try: try:
org = self._get_group(harvest_object.source.url, remote_org) org = self._get_group(harvest_object.source.url, remote_org)
for key in ['packages', 'created', 'users', 'groups', 'tags', 'extras', 'display_name', 'type']: for key in ['packages', 'created', 'users', 'groups', 'tags', 'extras', 'display_name', 'type']: