Private
Public Access
1
0

free coach has pro if four pro athletes

This commit is contained in:
Sander Roosendaal
2019-05-31 14:50:44 +02:00
parent 59d8f4dc18
commit 5b87181b0d
7 changed files with 38 additions and 3 deletions

View File

@@ -651,6 +651,10 @@ class CoachingGroup(models.Model):
id = self.pk,
name = self.name
)
def __len__(self):
rs = Rower.objects.filter(coachinggroups__in=[self])
return len(rs)
# Extension of User with rowing specific data
@python_2_unicode_compatible