Skip to content

Commit

Permalink
Forgot to update new name of team_from_user_hunt
Browse files Browse the repository at this point in the history
  • Loading branch information
dlareau committed Feb 13, 2020
1 parent cb3286d commit 208532e
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions huntserver/hunt_views.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ def protected_static(request, file_path):
if (hunt.is_public or user.is_staff):
allowed = True
else:
team = hunt.team_from_user_hunt(user)
team = hunt.team_from_user(user)
if (team is not None and puzzle in team.unlocked.all()):
allowed = True
elif(levels[0] == "solutions"):
Expand Down Expand Up @@ -71,7 +71,7 @@ def hunt(request, hunt_num):
"""

hunt = get_object_or_404(Hunt, hunt_number=hunt_num)
team = hunt.team_from_user_hunt(request.user)
team = hunt.team_from_user(request.user)

# Admins get all access, wrong teams/early lookers get an error page
# real teams get appropriate puzzles, and puzzles from past hunts are public
Expand Down Expand Up @@ -179,7 +179,7 @@ def puzzle_view(request, puzzle_id):
render the basic per-puzzle pages.
"""
puzzle = get_object_or_404(Puzzle, puzzle_id__iexact=puzzle_id)
team = puzzle.hunt.team_from_user_hunt(request.user)
team = puzzle.hunt.team_from_user(request.user)

if(team is not None):
request.ratelimit_key = team.team_name
Expand Down Expand Up @@ -291,7 +291,7 @@ def puzzle_hint(request, puzzle_id):
render the basic puzzle-hint pages.
"""
puzzle = get_object_or_404(Puzzle, puzzle_id__iexact=puzzle_id)
team = puzzle.hunt.team_from_user_hunt(request.user)
team = puzzle.hunt.team_from_user(request.user)
if(team is None):
return render(request, 'access_error.html', {'reason': "team"})

Expand Down Expand Up @@ -363,7 +363,7 @@ def chat(request):
A view to handle message submissions via POST, handle message update requests via AJAX, and
render the hunt participant view of the chat.
"""
team = Hunt.objects.get(is_current_hunt=True).team_from_user_hunt(request.user)
team = Hunt.objects.get(is_current_hunt=True).team_from_user(request.user)
if request.method == 'POST':
# There is data in the post request, but we don't need anything but
# the message because normal users can't send as staff or other teams
Expand Down Expand Up @@ -402,7 +402,7 @@ def chat(request):
@login_required
def unlockables(request):
""" A view to render the unlockables page for hunt participants. """
team = Hunt.objects.get(is_current_hunt=True).team_from_user_hunt(request.user)
team = Hunt.objects.get(is_current_hunt=True).team_from_user(request.user)
if(team is None):
return render(request, 'access_error.html', {'reason': "team"})
unlockables = Unlockable.objects.filter(puzzle__in=team.solved.all())
Expand Down

0 comments on commit 208532e

Please sign in to comment.