Private
Public Access
1
0

correction for None notes everywhere

This commit is contained in:
Sander Roosendaal
2017-05-22 20:42:45 +02:00
parent dd43805c08
commit b0e7ab2cb9
5 changed files with 22 additions and 6 deletions

View File

@@ -1266,9 +1266,13 @@ def workout_strava_upload_view(request,id=0):
tcxfile,tcxmessg = stravastuff.createstravaworkoutdata(w)
if tcxfile:
with open(tcxfile,'rb') as f:
try:
newnotes = w.notes+'\n from '+w.workoutsource+' via rowsandall.com'
except TypeError:
newnotes = 'from '+w.workoutsource+' via rowsandall.com'
res,mes = stravastuff.handle_stravaexport(f,w.name,
r.stravatoken,
description=w.notes+'\n from '+w.workoutsource+' via rowsandall.com')
description=newnotes)
if res==0:
messages.error(request,mes)
w.uploadedtostrava = -1