Skip to content

Commit

Permalink
fixed tabs -> spaces
Browse files Browse the repository at this point in the history
  • Loading branch information
JasonLovesDoggo committed Dec 3, 2023
1 parent d3606e8 commit b8232c2
Show file tree
Hide file tree
Showing 2 changed files with 38 additions and 38 deletions.
60 changes: 30 additions & 30 deletions .idea/workspace.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

16 changes: 8 additions & 8 deletions core/views/team.py
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ def join(request):
@login_required
@require_http_methods(["GET", "POST"])
def make(request):
if settings.START < datetime.datetime.now() and request.user.team is not None:
if settings.START < datetime.datetime.now() and request.user.team is not None:
messages.error(
request,
_("Since the hunt has already begun, making new teams is disallowed."),
Expand All @@ -76,7 +76,7 @@ def make(request):
request.user.team = raw
request.user.save()
Invite.objects.get_or_create(
team=raw, code=generate_invite_code(), invites=0
team=raw, code=generate_invite_code(), invites=0
)
messages.success(
request,
Expand All @@ -91,9 +91,9 @@ def make(request):

@login_required
def solo(q: HttpRequest):
team = Team.objects.create(
solo=True, hunt=Hunt.current_hunt(), name=f"{q.user.username}'s Solo Team"
)
team = Team.objects.create(
solo=True, hunt=Hunt.current_hunt(), name=f"{q.user.username}'s Solo Team"
)
q.user.team = team
q.user.save()
return redirect(reverse("index"))
Expand All @@ -105,7 +105,7 @@ def solo(q: HttpRequest):
def invite(q):
invites = Invite.objects.filter(team=q.user.team).values_list("code", flat=True)
if invites.count() == 0:
print("No invites found, creating one")
Invite.objects.create(team=q.user.team, code=generate_invite_code(), invites=0)
return invite(q)
print("No invites found, creating one")
Invite.objects.create(team=q.user.team, code=generate_invite_code(), invites=0)
return invite(q)
return render(q, "core/team_invite.html", context=dict(invites=invites))

0 comments on commit b8232c2

Please sign in to comment.