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

Commit

Permalink
only count uuid=None; those are verified transactions
Browse files Browse the repository at this point in the history
  • Loading branch information
Jeff Balogh committed Jul 22, 2010
1 parent b3ac28d commit 44cd44b
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions apps/stats/tasks.py
Expand Up @@ -24,8 +24,9 @@ def addon_total_contributions(*addons):

log.info('[%s@%s] Updating total contributions.' %
(len(addons), addon_total_contributions.rate_limit))
stats = (Contribution.objects.filter(addon__in=addons).values_list('addon')
.annotate(Sum('amount')))
# Only count uuid=None; those are verified transactions.
stats = (Contribution.objects.filter(addon__in=addons, uuid=None)
.values_list('addon').annotate(Sum('amount')))

for addon, total in stats:
Addon.objects.filter(id=addon).update(total_contributions=total)
Expand Down

0 comments on commit 44cd44b

Please sign in to comment.