Skip to content

Commit

Permalink
corrects an issue with how gmv totals were calculated
Browse files Browse the repository at this point in the history
  • Loading branch information
Kevin Owocki authored and Kevin Owocki committed Dec 21, 2021
1 parent 62b4c5b commit 9ce41f2
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions app/retail/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -536,10 +536,12 @@ def get_kudos_leaderboard(key='kudos_token.artist'):
pp.profile_time('completion_rate')
bounty_abandonment_rate = round(100 - completion_rate, 1)
total_bounties_usd = sum(base_bounties.exclude(idx_status__in=['expired', 'cancelled', 'canceled', 'unknown']).values_list('_val_usd_db', flat=True))
total_bounties_usd += sum(ManualStat.objects.filter(key='bounty_gmv', date__lt=timezone.now()).values_list('val', flat=True))
total_tips_usd = sum([
tip.value_in_usdt
for tip in Tip.objects.filter(network='mainnet').send_happy_path() if tip.value_in_usdt
])
total_tips_usd += sum(ManualStat.objects.filter(key='tip_gmv', date__lt=timezone.now()).values_list('val', flat=True))
total_grants_usd = get_grants_history_at_date(timezone.now(), [])
total_kudos_usd = get_kudos_history_at_date(timezone.now(), [])
total_codefund_usd = get_codefund_history_at_date(timezone.now(), '')
Expand Down

0 comments on commit 9ce41f2

Please sign in to comment.