Skip to content

Commit

Permalink
fix: compare query for harvester
Browse files Browse the repository at this point in the history
  • Loading branch information
anastasianayden committed May 3, 2024
1 parent a25d8b3 commit 6cf5e10
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions ckanext/fairdatapoint/harvesters/civity_harvester.py
Original file line number Diff line number Diff line change
Expand Up @@ -359,7 +359,7 @@ def import_stage(self, harvest_object):
# Get the last harvested object (if any)
previous_object = model.Session.query(HarvestObject) \
.filter(HarvestObject.guid == harvest_object.guid) \
.filter(HarvestObject.current is True) \
.filter(HarvestObject.current == True) \
.first()

# Flag previous object as not current anymore
Expand Down Expand Up @@ -427,7 +427,7 @@ def _get_guids_to_package_ids_from_database(harvest_job):
:return:
"""
query = model.Session.query(HarvestObject.guid, HarvestObject.package_id). \
filter(HarvestObject.current is True). \
filter(HarvestObject.current == True). \
filter(HarvestObject.harvest_source_id == harvest_job.source.id)

guid_to_package_id = {}
Expand Down

0 comments on commit 6cf5e10

Please sign in to comment.