Skip to content

Commit

Permalink
remove unused fields
Browse files Browse the repository at this point in the history
  • Loading branch information
walidmujahid committed Aug 19, 2020
1 parent 2f37ac6 commit 040c815
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 14 deletions.
9 changes: 1 addition & 8 deletions app/dashboard/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -1091,16 +1091,9 @@ def get_token_recipient_senders(network, recipient_address, token_address):
return [process_log(log) for log in logs]


def get_hackathon_event(title, event, network):
event_bounties = Bounty.objects.filter(event=event, network=network)
def get_hackathon_event(title, event):

return {
'title': title,
'hackathon': event,
'value_in_usdt': sum(
prize_usdt.value_in_usdt_now
for prize_usdt
in event_bounties
),
'registrants': HackathonRegistration.objects.filter(hackathon=event).count()
}
9 changes: 3 additions & 6 deletions app/dashboard/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -4359,9 +4359,6 @@ def get_hackathons(request):
current_hackathon_events = HackathonEvent.objects.current().filter(visible=True).order_by('-start_date')
upcoming_hackathon_events = HackathonEvent.objects.upcoming().filter(visible=True).order_by('-start_date')
finished_hackathon_events = HackathonEvent.objects.finished().filter(visible=True).order_by('-start_date')
all_hackathon_events = HackathonEvent.objects.all().filter(visible=True)

network = get_default_network()

tabs = [
('current', 'happening now'),
Expand All @@ -4373,17 +4370,17 @@ def get_hackathons(request):

if current_hackathon_events.exists():
for event in current_hackathon_events:
event_dict = get_hackathon_event('current', event, network)
event_dict = get_hackathon_event('current', event)
hackathon_events.append(event_dict)

if upcoming_hackathon_events.exists():
for event in upcoming_hackathon_events:
event_dict = get_hackathon_event('upcoming', event, network)
event_dict = get_hackathon_event('upcoming', event)
hackathon_events.append(event_dict)

if finished_hackathon_events.exists():
for event in finished_hackathon_events:
event_dict = get_hackathon_event('finished', event, network)
event_dict = get_hackathon_event('finished', event)
hackathon_events.append(event_dict)


Expand Down

0 comments on commit 040c815

Please sign in to comment.