Private
Public Access
1
0

free coach implementation

This commit is contained in:
Sander Roosendaal
2019-05-16 09:43:04 +02:00
parent 58197b6b62
commit fcc8725a97
6 changed files with 77 additions and 14 deletions

View File

@@ -1009,7 +1009,7 @@ def iscoachmember(user):
r = Rower(user=user)
r.save()
result = user.is_authenticated and (r.rowerplan=='coach')
result = user.is_authenticated and ('coach' in r.rowerplan)
else:
result = False
@@ -1025,7 +1025,7 @@ def cancreateteam(user):
r = Rower(user=user)
r.save()
if user.is_authenticated and (r.rowerplan=='coach'):
if user.is_authenticated and ('coach' in r.rowerplan):
return True
elif user.is_athenticated() and r.rowerplan in ['plan','pro']:
ts = Team.objects.filter(manager=user)