Private
Public Access
1
0

reinstalling club size

This commit is contained in:
Sander Roosendaal
2019-02-21 20:26:44 +01:00
parent fe59ead06b
commit 2c3d9532b0
4 changed files with 14 additions and 5 deletions

View File

@@ -189,7 +189,9 @@ def rower_teams_view(request,message='',successmessage=''):
coachrequests = CoachRequest.objects.filter(coach=r)
invitedathletes = [rekwest.user for rekwest in mycoachoffers]
invitedcoaches = [rekwest.coach for rekwest in mycoachrequests]
invitedcoaches = [rekwest.coach for rekwest in mycoachrequests ]
invitedcoaches += [rekwest.coach for rekwest in coachoffers]
invitingathletes = [rekwest.user for rekwest in coachrequests]
coaches = teams.rower_get_coaches(r)
@@ -200,6 +202,7 @@ def rower_teams_view(request,message='',successmessage=''):
]
potentialcoaches = list(set(potentialcoaches+offercoaches))
potentialcoaches = [c for c in potentialcoaches if c.rower not in invitedcoaches+coaches]
potentialcoaches = [c for c in potentialcoaches if teams.get_coach_club_size(c.rower)<c.rower.clubsize]
coachees = teams.coach_getcoachees(r)
@@ -213,6 +216,7 @@ def rower_teams_view(request,message='',successmessage=''):
else:
potentialathletes = []
potentialathletes = [a for a in potentialathletes if a.user not in invitingathletes]
# clubsize = teams.count_invites(request.user)+teams.count_club_members(request.user)
# max_clubsize = r.clubsize