Skip to content

Commit

Permalink
[harvesters/_json.py] Fixes the guid parameter for filtering the mode…
Browse files Browse the repository at this point in the history
…l session query
  • Loading branch information
MuhammadIsmailShahzad committed Sep 4, 2020
1 parent 100062d commit 863701e
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions ckanext/dcat/harvesters/_json.py
Original file line number Diff line number Diff line change
Expand Up @@ -193,9 +193,10 @@ def import_stage(self, harvest_object):
context, {'id': harvest_object.package_id})
log.info('Deleted package {0} with guid {1}'
.format(harvest_object.package_id, harvest_object.guid))

model.Session.query(HarvestObject).\
filter_by(guid=guid).\
filter_by(guid=harvest_object.guid).\
filter_by(current=True).\
update({'current': False}, False)

return True
Expand Down

0 comments on commit 863701e

Please sign in to comment.