Private
Public Access
1
0

bugfix new_workout_from_file

This commit is contained in:
Sander Roosendaal
2017-02-16 19:11:13 +01:00
parent c59cfee8b2
commit e33518bdf9

View File

@@ -448,13 +448,13 @@ def new_workout_from_file(r,f2,
if fileformat == 'c2log':
os.remove(f2)
message = "This C2 logbook summary does not contain stroke data. Please download the Export Stroke Data file from the workout details on the C2 logbook."
return (0,message)
return (0,message,f2)
# Some people try to upload RowPro summary logs
if fileformat == 'rowprolog':
os.remove(f2)
message = "This RowPro logbook summary does not contain stroke data. Please use the Stroke Data CSV file for the individual workout in your log."
return (0,message)
return (0,message,f2)
# Sometimes people try an unsupported file type.
# Send an email to info@rowsandall.com with the file attached
@@ -469,7 +469,7 @@ def new_workout_from_file(r,f2,
else:
res = queuehigh.enqueue(handle_sendemail_unrecognized,
f2,r.user.email)
return (0,message)
return (0,message,f2)
# handle non-Painsled by converting it to painsled compatible CSV
if (fileformat != 'csv'):