Skip to content

Commit

Permalink
feedback from dan
Browse files Browse the repository at this point in the history
  • Loading branch information
owocki committed Jan 7, 2020
1 parent e61b331 commit 3f49ec6
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions app/grants/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -278,8 +278,10 @@ def history_by_month(self):
# returns [["", "Subscription Billing", "New Subscriptions", "One-Time Contributions", "CLR Matching Funds"], ["December 2017", 5534, 2011, 0, 0], ["January 2018", 10396, 0 , 0, 0 ], ... for each monnth in which this grant has contribution history];
CLR_PAYOUT_HANDLES = ['vs77bb', 'gitcoinbot', 'notscottmoore', 'owocki']
month_to_contribution_numbers = {}
for sub in self.subscriptions.all():
for contrib in sub.subscription_contribution.filter(success=True):
subs = self.subscriptions.all().prefetch_related('subscription_contribution')
for sub in subs:
contribs = [sc for sc in sub.subscription_contribution.all() if sc.success]
for contrib in contribs:
#add all contributions
key = contrib.created_on.strftime("%Y/%m")
subkey = 'One-Time'
Expand Down

0 comments on commit 3f49ec6

Please sign in to comment.