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

@@ -20,6 +20,7 @@ import requests
from django.http import HttpResponse
lbstoN = 4.44822
landingpages = (
@@ -407,8 +408,12 @@ def totaltime_sec_to_string(totaltime):
def isprorower(r):
result = False
result = r.rowerplan in ['pro','coach','plan']
if not result and r.protrialexpires:
result = r.rowerplan == 'basic' and r.protrialexpires >= datetime.date.today()
if not result and r.rowerplan == 'freecoach':
if r.mycoachgroup is not None:
result = len(r.mycoachgroup)>=4
return result