Skip to content

Commit

Permalink
fix initial team total calculation with existing indexes
Browse files Browse the repository at this point in the history
  • Loading branch information
jtolio committed Jun 17, 2014
1 parent fe17c2d commit a5809e6
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions backend/model.py
Original file line number Diff line number Diff line change
Expand Up @@ -252,9 +252,9 @@ def _create(cls, team_id, pledge_8_count):
def _pledge8Count(team_id):
"""do this outside of a transaction"""
total = 0
for pledge in Pledge.all().filter("team =", team_id).filter(
"model_version <", 9):
total += pledge.amountCents
for pledge in Pledge.all().filter("team =", team_id):
if pledge.model_version < 9:
total += pledge.amountCents
return total

@classmethod
Expand Down

0 comments on commit a5809e6

Please sign in to comment.