Revert removal of filter in job list action in 7544d5c

This commit is contained in:
amercader 2013-03-06 12:19:20 +00:00
parent d9a71f7c59
commit 04710fd1c6
1 changed files with 4 additions and 0 deletions

View File

@ -217,12 +217,16 @@ def harvest_job_list(context,data_dict):
session = context['session']
source_id = data_dict.get('source_id',False)
status = data_dict.get('status', False)
query = session.query(HarvestJob)
if source_id:
query = query.filter(HarvestJob.source_id==source_id)
if status:
query = query.filter(HarvestJob.status==status)
query = query.order_by(HarvestJob.created.desc())
jobs = query.all()