Skip to content

Commit

Permalink
Harvester Base: force package update if existing package is in delete…
Browse files Browse the repository at this point in the history
…d state ckan#542
  • Loading branch information
danielcoelhocgu committed May 9, 2024
1 parent 5b8da48 commit 6cdc217
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion ckanext/harvest/harvesters/base.py
Expand Up @@ -295,7 +295,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'):
package_dict['metadata_modified'] > existing_package_dict.get('metadata_modified') or \
existing_package_dict['state'] == 'deleted':
log.info('Package with GUID %s exists and needs to be updated' % harvest_object.guid)
# Update package
context.update({'id': package_dict['id']})
Expand Down

0 comments on commit 6cdc217

Please sign in to comment.