Private
Public Access
1
0
This commit is contained in:
Sander Roosendaal
2016-12-08 23:07:57 +01:00
parent a37bb03fd8
commit 8895f61e73
4 changed files with 46 additions and 28 deletions

View File

@@ -163,7 +163,7 @@ def make_new_workout_from_email(rr,f2,name,cntr=0):
timestr = time.strftime("%Y%m%d-%H%M%S")
filename = timestr+str(cntr)+'o.csv'
row.write_csv('media/'+filename)
row.write_csv('media/'+filename,gzip=True)
f2 = filename
# make workout and put in database
@@ -199,14 +199,14 @@ def make_new_workout_from_email(rr,f2,name,cntr=0):
row.df = row.df.fillna(0)
row.write_csv(f2)
row.write_csv(f2,gzip=True)
# recalculate power data
if workouttype == 'rower' or workouttype == 'dynamic' or workouttype == 'slides':
try:
row.erg_recalculatepower()
# row.spm_fromtimestamps()
row.write_csv(f2)
row.write_csv(f2,gzip=True)
except:
pass