From 8a2c072d4e837851a219436d9075547cc8ba8c67 Mon Sep 17 00:00:00 2001 From: Tom Mortimer-Jones Date: Tue, 12 Aug 2014 11:18:48 +0100 Subject: [PATCH] [101] Use name from database when reharvesting package --- ckanext/harvest/harvesters/base.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/ckanext/harvest/harvesters/base.py b/ckanext/harvest/harvesters/base.py index da2fb1b..00afd03 100644 --- a/ckanext/harvest/harvesters/base.py +++ b/ckanext/harvest/harvesters/base.py @@ -162,6 +162,10 @@ class HarvesterBase(SingletonPlugin): data_dict['id'] = package_dict['id'] try: existing_package_dict = get_action('package_show')(context, data_dict) + + # In case name has been modified when first importing. See issue #101. + package_dict['name'] = existing_package_dict['name'] + # Check modified date if not 'metadata_modified' in package_dict or \ package_dict['metadata_modified'] > existing_package_dict.get('metadata_modified'):