diff --git a/ckanext/harvest/harvesters/base.py b/ckanext/harvest/harvesters/base.py index ed3eea5..e19941b 100644 --- a/ckanext/harvest/harvesters/base.py +++ b/ckanext/harvest/harvesters/base.py @@ -178,6 +178,8 @@ class HarvesterBase(SingletonPlugin): else: log.info('Package with GUID %s not updated, skipping...' % harvest_object.guid) + harvest_object.report_status = 'not modified' + harvest_object.save() return # Flag the other objects linking to this package as not current anymore diff --git a/ckanext/harvest/harvesters/ckanharvester.py b/ckanext/harvest/harvesters/ckanharvester.py index 835e27c..621a75f 100644 --- a/ckanext/harvest/harvesters/ckanharvester.py +++ b/ckanext/harvest/harvesters/ckanharvester.py @@ -165,7 +165,7 @@ class CKANHarvester(HarvesterBase): package_ids.append(package_id) else: log.info('No packages have been updated on the remote CKAN instance since the last harvest job') - return None + return [] except urllib2.HTTPError,e: if e.getcode() == 400: diff --git a/ckanext/harvest/queue.py b/ckanext/harvest/queue.py index b8c4131..d32dd33 100644 --- a/ckanext/harvest/queue.py +++ b/ckanext/harvest/queue.py @@ -318,7 +318,7 @@ def fetch_and_import_stages(harvester, obj): else: obj.state = "ERROR" obj.save() - if obj.report_status: + if obj.report_status == 'not modified': return if obj.state == 'ERROR': obj.report_status = 'errored'