Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,5 @@ syntax: glob
*~
dist
build
.vscode/
.idea/
8 changes: 5 additions & 3 deletions ckanext/spatial/harvesters/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -683,9 +683,11 @@ def import_stage(self, harvest_object):
# Check if the modified date is more recent
if not self.force_import and previous_object and harvest_object.metadata_modified_date <= previous_object.metadata_modified_date:

# Assign the previous job id to the new object to
# avoid losing history
harvest_object.harvest_job_id = previous_object.job.id
# Assign the previous job id (if it hasn't been cleared) to the new object to avoid losing history
if previous_object.job:
harvest_object.harvest_job_id = previous_object.job.id
else:
harvest_object.harvest_job_id = None
harvest_object.add()

# Delete the previous object to avoid cluttering the object table
Expand Down