Private
Public Access
1
0

going through the tests

This commit is contained in:
2024-12-30 17:22:42 +01:00
parent 9c7f06684e
commit 2759fd56eb
39 changed files with 135 additions and 500 deletions

View File

@@ -1326,8 +1326,6 @@ class Rower(models.Model):
for group in self.coachinggroups.all():
try:
coach = Rower.objects.get(mycoachgroup=group)
if coach.rowerplan == 'freecoach': # pragma: no cover
self.coachinggroups.remove(group)
except Rower.DoesNotExist: # pragma: no cover
pass
except ValueError:
@@ -1350,7 +1348,7 @@ class Rower(models.Model):
return coaches
def can_coach(self):
if self.rowerplan not in ['coach', 'freecoach']:
if self.rowerplan != 'pro':
return False
rs = Rower.objects.filter(coachinggroups__in=[self.mycoachgroup])