reinstalling club size
This commit is contained in:
@@ -119,7 +119,7 @@ def add_coach(coach,rower):
|
||||
coach.mycoachgroup = coachgroup
|
||||
coach.save()
|
||||
|
||||
if get_coach_club_size(coach)<=coach.clubsize:
|
||||
if get_coach_club_size(coach)<coach.clubsize:
|
||||
rower.coachinggroups.add(coach.mycoachgroup)
|
||||
|
||||
return (1,"Added Coach")
|
||||
@@ -312,13 +312,15 @@ def create_coaching_offer(coach,user):
|
||||
while code in codes:
|
||||
code = uuid.uuid4().hex[:10].upper()
|
||||
|
||||
if coach.rowerplan == 'coach' and get_coach_club_size(coach)<=coach.clubsize:
|
||||
if coach.rowerplan == 'coach' and get_coach_club_size(coach)<coach.clubsize:
|
||||
rekwest = CoachOffer(coach=coach,user=user,code=code)
|
||||
rekwest.save()
|
||||
|
||||
send_coacheerequest_email(rekwest)
|
||||
|
||||
return (rekwest.id,'The request was created')
|
||||
elif get_coach_club_size(coach)>=coach.clubsize:
|
||||
return(0,'You have reached the maximum number of athletes')
|
||||
|
||||
else:
|
||||
return (0,'You are not a coach')
|
||||
|
||||
Reference in New Issue
Block a user