bugfix promember check
This commit is contained in:
@@ -207,8 +207,11 @@ def iscoachmember(user):
|
||||
|
||||
# Check if a user is a Pro member
|
||||
def ispromember(user):
|
||||
r = Rower.objects.get(user=user)
|
||||
result = user.is_authenticated() and (r.rowerplan=='pro' or r.rowerplan=='coach')
|
||||
if not user.is_anonymous():
|
||||
r = Rower.objects.get(user=user)
|
||||
result = user.is_authenticated() and (r.rowerplan=='pro' or r.rowerplan=='coach')
|
||||
else:
|
||||
result = False
|
||||
return result
|
||||
|
||||
# User registration
|
||||
|
||||
Reference in New Issue
Block a user