Skip to content

Commit

Permalink
Add max roof for inivites
Browse files Browse the repository at this point in the history
  • Loading branch information
didrikmunther committed Nov 19, 2024
1 parent 621c800 commit 0bf24a0
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion banquet/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -471,7 +471,10 @@ def dashboard(request, year):
]
invite_permission = request.user in auth_users

max_invites = 2 # The number of people someone may invite to the after party
max_total_invites = 160
total_invites = AfterPartyInvitation.objects.filter(banquet__fair=fair).count()
invites_are_full = total_invites >= max_total_invites
max_invites = 0 if invites_are_full else 2

# Any Armada member can invite friends to the after-party
# during a time period before the current fair
Expand Down

0 comments on commit 0bf24a0

Please sign in to comment.