Only try to create/match a organization if there is a remote_org

This commit is contained in:
Stefan Oderbolz 2013-10-11 18:08:32 +02:00
parent dd1acd0c6b
commit 8b5d70c6fe
1 changed files with 18 additions and 17 deletions

View File

@ -309,6 +309,7 @@ class CKANHarvester(HarvesterBase):
remote_org = package_dict['owner_org']
context = {'model': model, 'session': Session, 'user': 'harvest'}
if remote_org:
try:
data_dict = {'id': remote_org}
org = get_action('organization_show')(context, data_dict)