Merge branch '101-modified-package-name' of https://github.com/morty/ckanext-harvest into morty-101-modified-package-name

This commit is contained in:
amercader 2014-08-29 14:38:33 +01:00
commit 546159744e
1 changed files with 4 additions and 0 deletions

View File

@ -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'):