Fix bug where source was being treated as an object, when it's a dict

This commit is contained in:
Vitor Baptista 2013-07-29 07:06:58 -03:00
parent cc3f3d3426
commit 70e53a7833
1 changed files with 2 additions and 2 deletions

View File

@ -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']})