From e6bee9e3627327645fc50843be29d17946f54196 Mon Sep 17 00:00:00 2001 From: Jason Date: Sat, 9 Dec 2023 22:20:20 -0500 Subject: [PATCH] temp: add back solo so I can migrate prod --- core/views/team.py | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/core/views/team.py b/core/views/team.py index 65677f1..443aa42 100644 --- a/core/views/team.py +++ b/core/views/team.py @@ -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