From aaef4182322ca6384c0d2ffd3bafa5c4bb898441 Mon Sep 17 00:00:00 2001 From: Ben Soroos Date: Tue, 28 Jun 2022 13:37:27 +0100 Subject: [PATCH] 'force_harvest_update_all' key to force updates even when modification times would indicate otherwise --- ckanext/harvest/harvesters/base.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/ckanext/harvest/harvesters/base.py b/ckanext/harvest/harvesters/base.py index 97308294..77a03aa7 100644 --- a/ckanext/harvest/harvesters/base.py +++ b/ckanext/harvest/harvesters/base.py @@ -315,7 +315,8 @@ def _create_or_update_package(self, package_dict, harvest_object, # Check modified date if 'metadata_modified' not in package_dict or \ package_dict['metadata_modified'] > existing_package_dict.get('metadata_modified') \ - or package_dict['owner_org'] != existing_package_dict.get('owner_org'): + or package_dict['owner_org'] != existing_package_dict.get('owner_org') \ + or self.config.get("force_harvest_update_all", False): log.info('Package with GUID %s exists and needs to be updated' % harvest_object.guid) # Update package context.update({'id': package_dict['id']})