diff --git a/ckanext/harvest/logic/action/get.py b/ckanext/harvest/logic/action/get.py index 4fbb5ac..8716ea2 100644 --- a/ckanext/harvest/logic/action/get.py +++ b/ckanext/harvest/logic/action/get.py @@ -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):