Skip to content

Commit

Permalink
actually only update
Browse files Browse the repository at this point in the history
  • Loading branch information
jondot committed Aug 14, 2017
1 parent ec6a19b commit de7bad9
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions pgpipeline/__init__.py
Expand Up @@ -44,9 +44,11 @@ def process_item(self, item, spider):
if res is not None:
# remove keys with none value
selected = dict((k, v) for k, v in item.iteritems() if v)

self.table.upsert(
selected, self.ignore_identical, types=self.types)
self.table.upsert(
selected, self.ignore_identical, types=self.types)
else:
self.table.insert(
selected, self.ignore_identical, types=self.types)
else:
raise Exception("no such strategy: %s" % (self.onconflict))

Expand Down

0 comments on commit de7bad9

Please sign in to comment.