Skip to content

Commit

Permalink
temp: add back solo so I can migrate prod
Browse files Browse the repository at this point in the history
  • Loading branch information
JasonLovesDoggo committed Dec 10, 2023
1 parent bd41097 commit e6bee9e
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions core/views/team.py
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,19 @@ def make(request):
return render(request, "core/team_new.html", dict(form=form))


@login_required
@upcoming_hunt_required
@block_if_current_hunt
def solo(q: HttpRequest):
hunt_ = Hunt.current_hunt() or Hunt.next_hunt()
team_ = Team.objects.create(
solo=True, hunt=hunt_, name=f"{q.user.username}'s Solo Team"
)
team_.join(q.user)

return redirect(reverse("index"))


@login_required
@require_http_methods(["GET"])
@team_required
Expand Down

0 comments on commit e6bee9e

Please sign in to comment.