Skip to content

Commit

Permalink
bug in building the sql query when using composite primary keys
Browse files Browse the repository at this point in the history
  • Loading branch information
e-dorigatti committed Jul 1, 2014
1 parent 536499d commit 5498e94
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion scrapyrwiki/pipelines.py
Expand Up @@ -71,7 +71,7 @@ class CreatedModifiedPipeline(ScraperWikiPipeline):

def update_item(self, item, item_type, unique_keys, table_name):
now = datetime.utcnow()
where = ' '.join([("%s = '%s'" % (ukey, item[ukey]))
where = ' and '.join([("%s = '%s'" % (ukey, item[ukey]))
for ukey in unique_keys[item_type]])
sqlquery = "* from %s where %s" % (table_name, where)

Expand Down

0 comments on commit 5498e94

Please sign in to comment.