Skip to content

Commit

Permalink
fix buggy number on participants (gitcoinco#8683)
Browse files Browse the repository at this point in the history
  • Loading branch information
thelostone-mc authored and iRhonin committed Apr 23, 2021
1 parent 5e05f4c commit 3934885
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 6 deletions.
2 changes: 1 addition & 1 deletion app/dashboard/templates/dashboard/sponsors.html
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@
{{ prize_count }} Prizes
</p>
<p class="mb-0 font-body">
<span class="mr-md-3">{{ num_participants }} participants</span>
<span class="mr-md-3">{{ num_participants }} registrants</span>
<span>{{ num_submissions }} submissions</span>
</p>
</div>
Expand Down
5 changes: 3 additions & 2 deletions app/dashboard/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -4251,8 +4251,9 @@ def dashboard_sponsors(request, hackathon='', panel='prizes'):

what = f'hackathon:{hackathon_event.id}{filter}'

num_participants = BountyEvent.objects.filter(bounty__event_id=hackathon_event.id, event_type='express_interest', bounty__in=query_prizes).count()
num_submissions = BountyEvent.objects.filter(bounty__event_id=hackathon_event.id, event_type='submit_work', bounty__in=query_prizes).count()
all_participants = BountyEvent.objects.filter(bounty__event_id=hackathon_event.id, bounty__in=query_prizes)
num_participants = all_participants.count()
num_submissions = all_participants.filter(event_type='submit_work').count()

profile = request.user.profile if request.user.is_authenticated and hasattr(request.user, 'profile') else None

Expand Down
4 changes: 2 additions & 2 deletions app/grants/urls.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
from django.urls import path, re_path

from grants.views import (
add_grant_from_collection, bulk_fund, bulk_grants_for_cart, cancel_grant_v1, cart_thumbnail, clr_grants,
add_grant_from_collection, bulk_fund, bulk_grants_for_cart, cancel_grant_v1, cart_thumbnail, clr_grants, collage,
collection_thumbnail, contribute_to_grants_v1, contribution_addr_from_all_as_json,
contribution_addr_from_grant_as_json, contribution_addr_from_grant_during_round_as_json,
contribution_addr_from_round_as_json, contribution_info_from_grant_during_round_as_json, create_matching_pledge_v1,
Expand All @@ -30,7 +30,7 @@
grants, grants_addr_as_json, grants_bulk_add, grants_by_grant_type, grants_cart_view, grants_info, grants_landing,
ingest_contributions, ingest_contributions_view, invoice, leaderboard, manage_ethereum_cart_data,
new_matching_partner, profile, quickstart, remove_grant_from_collection, save_collection, subscription_cancel,
toggle_grant_favorite, verify_grant, collage
toggle_grant_favorite, verify_grant,
)

app_name = 'grants/'
Expand Down
2 changes: 1 addition & 1 deletion app/grants/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
import html
import json
import logging
import math
import re
import time
import uuid
Expand Down Expand Up @@ -3071,7 +3072,6 @@ def add_grant_from_collection(request, collection_id):
https://c.gitcoin.co/grants/b8fcf1833fee32fc4be6fba254c1d912/cashu.png
'''

import math
def get_urls(scale):
import random
global des_urls
Expand Down

0 comments on commit 3934885

Please sign in to comment.