[#205] Remove harvest_source_for_a_dataset action. It has been deprecated since Mar 6 16:54:33 2013 and returns wrong harvest stats keys.
This commit is contained in:
parent
121e8bd918
commit
67366093fe
|
@ -131,30 +131,6 @@ def harvest_source_list(context, data_dict):
|
|||
context.update({'detailed':False})
|
||||
return [harvest_source_dictize(source, context) for source in sources]
|
||||
|
||||
@side_effect_free
|
||||
def harvest_source_for_a_dataset(context, data_dict):
|
||||
'''
|
||||
TODO: Deprecated, harvest source id is added as an extra to each dataset
|
||||
automatically
|
||||
'''
|
||||
'''For a given dataset, return the harvest source that
|
||||
created or last updated it, otherwise NotFound.'''
|
||||
|
||||
model = context['model']
|
||||
session = context['session']
|
||||
|
||||
dataset_id = data_dict.get('id')
|
||||
|
||||
query = session.query(HarvestSource)\
|
||||
.join(HarvestObject)\
|
||||
.filter_by(package_id=dataset_id)\
|
||||
.order_by(HarvestObject.gathered.desc())
|
||||
source = query.first() # newest
|
||||
|
||||
if not source:
|
||||
raise NotFound
|
||||
|
||||
return harvest_source_dictize(source,context)
|
||||
|
||||
@side_effect_free
|
||||
def harvest_job_show(context,data_dict):
|
||||
|
|
Loading…
Reference in New Issue