diff --git a/gittip/models/_mixin_team.py b/gittip/models/_mixin_team.py index dee2b9bc2c..25edaf2681 100644 --- a/gittip/models/_mixin_team.py +++ b/gittip/models/_mixin_team.py @@ -132,18 +132,18 @@ def __set_take_for(self, member, amount, recorder): INSERT INTO takes (ctime, member, team, amount, recorder) VALUES ( COALESCE (( SELECT ctime FROM takes - WHERE member=%s - AND team=%s + WHERE member=%(member)s + AND team=%(team)s LIMIT 1 ), CURRENT_TIMESTAMP) - , %s - , %s - , %s - , %s + , %(member)s + , %(team)s + , %(amount)s + , %(recorder)s ) - """, (member.username, self.username, member.username, self.username, \ - amount, recorder.username)) + """, dict(member=member.username, team=self.username, amount=amount, + recorder=recorder.username)) def get_takes(self, for_payday=False): """Return a list of member takes for a team.