From 70e53a7833e5fca51f4bc2ff3a1f77c8a34c5a15 Mon Sep 17 00:00:00 2001 From: Vitor Baptista Date: Mon, 29 Jul 2013 07:06:58 -0300 Subject: [PATCH] Fix bug where source was being treated as an object, when it's a dict --- ckanext/harvest/logic/action/create.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ckanext/harvest/logic/action/create.py b/ckanext/harvest/logic/action/create.py index 0f2933a..392ac48 100644 --- a/ckanext/harvest/logic/action/create.py +++ b/ckanext/harvest/logic/action/create.py @@ -105,9 +105,9 @@ def harvest_job_create_all(context,data_dict): jobs = [] # Create a new job for each, if there isn't already one for source in sources: - exists = _check_for_existing_jobs(context, source.id) + exists = _check_for_existing_jobs(context, source['id']) if exists: - log.info('Skipping source %s as it already has a pending job',source.id) + log.info('Skipping source %s as it already has a pending job', source['id']) continue job = harvest_job_create(context,{'source_id':source['id']})