tested processemail management command
This commit is contained in:
@@ -186,8 +186,14 @@ def make_new_workout_from_email(rr,f2,name,cntr=0):
|
||||
|
||||
summary = ''
|
||||
# handle non-Painsled
|
||||
f3,summary = dataprep.handle_nonpainsled('media/'+f2,fileformat,summary)
|
||||
|
||||
if fileformat != 'csv':
|
||||
f3,summary = dataprep.handle_nonpainsled('media/'+f2,fileformat,summary)
|
||||
else:
|
||||
f3 = 'media/'+f2
|
||||
|
||||
|
||||
|
||||
|
||||
# make workout and put in database
|
||||
#r = rrower(hrmax=rr.max,hrut2=rr.ut2,
|
||||
# hrut1=rr.ut1,hrat=rr.at,
|
||||
@@ -196,11 +202,11 @@ def make_new_workout_from_email(rr,f2,name,cntr=0):
|
||||
if row == 0:
|
||||
return 0
|
||||
|
||||
|
||||
# change filename
|
||||
if f2[:5] != 'media':
|
||||
timestr = time.strftime("%Y%m%d-%H%M%S")
|
||||
f2 = 'media/'+timestr+str(cntr)+'o.csv'
|
||||
|
||||
|
||||
row.write_csv(f2,gzip=True)
|
||||
dosummary = (fileformat != 'fit')
|
||||
|
||||
Reference in New Issue
Block a user