Private
Public Access
1
0

fix bug zipfile no summary

This commit is contained in:
Sander Roosendaal
2018-05-04 11:18:33 +02:00
parent 4e7a2316fa
commit da5d407a85

View File

@@ -118,6 +118,7 @@ def make_new_workout_from_email(rower, datafile, name, cntr=0,testing=False):
return 0
summary = ''
# handle non-Painsled
if fileformat != 'csv':
@@ -147,10 +148,11 @@ def make_new_workout_from_email(rower, datafile, name, cntr=0,testing=False):
except KeyError:
pass
row.write_csv(datafilename, gzip=True)
dosummary = (fileformat != 'fit' and 'speedcoach2' not in fileformat)
dosummary = dosummary or summary == ''
if name == '':
name = 'Workout from Background Queue'
@@ -158,6 +160,7 @@ def make_new_workout_from_email(rower, datafile, name, cntr=0,testing=False):
datafilename, rower,
workouttype=workouttype,
dosummary=dosummary,
summary=summary,
inboard=inboard,
oarlength=oarlength,
title=name,