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

@@ -242,6 +242,10 @@ def createc2workoutdata_as_splits(w):
except ValueError:
durationstr = datetime.strptime(str(w.duration),"%H:%M:%S")
try:
newnotes = w.notes+'\n from '+w.workoutsource+' via rowsandall.com'
except TypeError:
newnotes = 'from '+w.workoutsource+' via rowsandall.com'
data = {
"type": w.workouttype,
@@ -250,7 +254,7 @@ def createc2workoutdata_as_splits(w):
"time": int(10*makeseconds(durationstr)),
"timezone": "Etc/UTC",
"weight_class": c2wc(w.weightcategory),
"comments": w.notes+'\n from '+w.workoutsource+' via rowsandall.com',
"comments": newnotes,
"heart_rate": {
"average": averagehr,
"max": maxhr,