Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix buggy number on participants #8683

Merged
merged 1 commit into from
Mar 25, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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()
Comment on lines +4254 to +4256
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔥


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,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

what is collage? I don't see it here

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's here -- #8674

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