Skip to content
This repository has been archived by the owner on Feb 8, 2018. It is now read-only.

Commit

Permalink
Fix regression in start_package_claims
Browse files Browse the repository at this point in the history
  • Loading branch information
chadwhitacre committed Apr 13, 2017
1 parent 2c2a3a5 commit 9926985
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions gratipay/models/participant/email.py
Original file line number Diff line number Diff line change
Expand Up @@ -187,11 +187,11 @@ def start_package_claims(self, c, nonce, *packages):
# do a little SQL construction. Do it in such a way that we still avoid
# Python string interpolation (~= SQLi vector).

extra_sql, values = '', []
extra_sql, values = [], []
for p in packages:
extra_sql += ' (%s, %s)'
extra_sql.append('(%s, %s)')
values += [nonce, p.id]
c.run('INSERT INTO claims (nonce, package_id) VALUES' + extra_sql, values)
c.run('INSERT INTO claims (nonce, package_id) VALUES' + ', '.join(extra_sql), values)
self.app.add_event( c
, 'participant'
, dict( id=self.id
Expand Down

0 comments on commit 9926985

Please sign in to comment.