reinstalling club size
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user