[#86] Fix duplicate extras

This commit is contained in:
amercader 2014-02-11 18:16:49 +00:00
parent fbde0b8dc1
commit d3cf5e58d1
1 changed files with 3 additions and 1 deletions

View File

@ -56,7 +56,9 @@ class Harvest(p.SingletonPlugin, DefaultDatasetForm):
def before_view(self, data_dict):
if not 'type' in data_dict or data_dict['type'] != DATASET_TYPE_NAME:
# check_ckan_version should be more clever than this
if p.toolkit.check_ckan_version(max_version='2.1.99') and (
not 'type' in data_dict or data_dict['type'] != DATASET_TYPE_NAME):
# This is a normal dataset, check if it was harvested and if so, add
# info about the HarvestObject and HarvestSource
harvest_object = model.Session.query(HarvestObject) \