changing can_coahc
This commit is contained in:
@@ -1117,6 +1117,17 @@ class Rower(models.Model):
|
||||
|
||||
return coaches
|
||||
|
||||
def can_coach(self):
|
||||
if self.rowerplan not in ['coach','freecoach']:
|
||||
return False
|
||||
|
||||
rs = Rower.objects.filter(coachinggroups__in=[self.mycoachgroup])
|
||||
rekwests = CoachOffer.objects.filter(coach=self)
|
||||
if len(rs)+len(rekwests) < self.clubsize and self.offercoaching:
|
||||
return True
|
||||
|
||||
return False
|
||||
|
||||
@property
|
||||
def ispaid(self):
|
||||
return self.rowerplan in ['pro','plan','coach']
|
||||
|
||||
Reference in New Issue
Block a user