Merge tag 'v2.43' into develop
hotfix TP sync
This commit is contained in:
@@ -423,7 +423,8 @@ def save_workout_database(f2,r,dosmooth=True,workouttype='rower',
|
||||
except KeyError:
|
||||
pass
|
||||
|
||||
|
||||
if np.isnan(totaltime):
|
||||
totaltime = 0
|
||||
|
||||
hours = int(totaltime/3600.)
|
||||
if hours>23:
|
||||
|
||||
@@ -152,7 +152,9 @@ def get_token(code):
|
||||
refresh_token = token_json['refresh_token']
|
||||
except KeyError:
|
||||
thetoken = 0
|
||||
|
||||
expires_in = 0
|
||||
refresh_token = 0
|
||||
|
||||
return thetoken,expires_in,refresh_token
|
||||
|
||||
# Make authorization URL including random string
|
||||
|
||||
@@ -1230,10 +1230,10 @@ def workout_tp_upload_view(request,id=0):
|
||||
message = ""
|
||||
r = Rower.objects.get(user=request.user)
|
||||
res = -1
|
||||
# try:
|
||||
thetoken = tp_open(r.user)
|
||||
# except TPNoTokenError:
|
||||
# return HttpResponseRedirect("/rowers/me/tpauthorize/")
|
||||
try:
|
||||
thetoken = tp_open(r.user)
|
||||
except TPNoTokenError:
|
||||
return HttpResponseRedirect("/rowers/me/tpauthorize/")
|
||||
|
||||
# ready to upload. Hurray
|
||||
try:
|
||||
|
||||
Reference in New Issue
Block a user