diff --git a/rowers/teams.py b/rowers/teams.py index 78e51d0a..1f6c0881 100644 --- a/rowers/teams.py +++ b/rowers/teams.py @@ -167,7 +167,10 @@ def rower_get_coaches(rower): def coach_getcoachees(coach): - return Rower.objects.filter(coachinggroups__in=[coach.mycoachgroup]).distinct() + if coach.mycoachgroup and coach.rowerplan == 'coach': + return Rower.objects.filter(coachinggroups__in=[coach.mycoachgroup]).distinct() + else: + return [] def coach_remove_athlete(coach,rower): try: