Private
Public Access
1
0

removed some more old notokenerrors

This commit is contained in:
Sander Roosendaal
2018-06-26 12:54:27 +02:00
parent 3dc998d623
commit 55dd757823
4 changed files with 12 additions and 12 deletions

View File

@@ -54,7 +54,7 @@ def c2_open(user):
r = Rower.objects.get(user=user)
if (r.c2token == '') or (r.c2token is None):
s = "Token doesn't exist. Need to authorize"
raise C2NoTokenError("User has no token")
raise NoTokenError("User has no token")
else:
if (timezone.now()>r.tokenexpirydate):
res = rower_c2_token_refresh(user)
@@ -97,7 +97,7 @@ def get_c2_workouts(rower):
try:
thetoken = c2_open(rower.user)
except C2NoTokenError:
except NoTokenError:
return 0
res = get_c2_workout_list(rower.user,page=1)