bugfix new_workout_from_file
This commit is contained in:
@@ -448,13 +448,13 @@ def new_workout_from_file(r,f2,
|
|||||||
if fileformat == 'c2log':
|
if fileformat == 'c2log':
|
||||||
os.remove(f2)
|
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."
|
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
|
# Some people try to upload RowPro summary logs
|
||||||
if fileformat == 'rowprolog':
|
if fileformat == 'rowprolog':
|
||||||
os.remove(f2)
|
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."
|
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.
|
# Sometimes people try an unsupported file type.
|
||||||
# Send an email to info@rowsandall.com with the file attached
|
# Send an email to info@rowsandall.com with the file attached
|
||||||
@@ -469,7 +469,7 @@ def new_workout_from_file(r,f2,
|
|||||||
else:
|
else:
|
||||||
res = queuehigh.enqueue(handle_sendemail_unrecognized,
|
res = queuehigh.enqueue(handle_sendemail_unrecognized,
|
||||||
f2,r.user.email)
|
f2,r.user.email)
|
||||||
return (0,message)
|
return (0,message,f2)
|
||||||
|
|
||||||
# handle non-Painsled by converting it to painsled compatible CSV
|
# handle non-Painsled by converting it to painsled compatible CSV
|
||||||
if (fileformat != 'csv'):
|
if (fileformat != 'csv'):
|
||||||
|
|||||||
Reference in New Issue
Block a user