Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/stable'
Browse files Browse the repository at this point in the history
  • Loading branch information
thelostone-mc committed Dec 21, 2021
2 parents e3c69a4 + 5521892 commit 5d1a136
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
8 changes: 5 additions & 3 deletions app/retail/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -535,11 +535,13 @@ def get_kudos_leaderboard(key='kudos_token.artist'):
context['audience'] = json.loads(context['members_history'])[-1][1]
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_tips_usd = sum([
total_bounties_usd = float(sum(base_bounties.exclude(idx_status__in=['expired', 'cancelled', 'canceled', 'unknown']).values_list('_val_usd_db', flat=True)))
total_bounties_usd += float(sum(ManualStat.objects.filter(key='bounty_gmv', date__lt=timezone.now()).values_list('val', flat=True)))
total_tips_usd = float(sum([
tip.value_in_usdt
for tip in Tip.objects.filter(network='mainnet').send_happy_path() if tip.value_in_usdt
])
]))
total_tips_usd += float(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
2 changes: 1 addition & 1 deletion app/retail/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -801,7 +801,7 @@ def get_specific_activities(what, trending_only, user, after_pk, request=None, p

# single activity
if 'activity:' in what:
activities = Activity.objects.filter(activities_index__key=what.replace('activity:', ''))
activities = Activity.objects.filter(pk=what.replace('activity:', ''))
filter_applied = True

# Defaults
Expand Down

0 comments on commit 5d1a136

Please sign in to comment.