Merge branch 'release/v9.90'
This commit is contained in:
+7
-12
@@ -1350,18 +1350,13 @@ def new_workout_from_file(r, 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'):
|
||||||
try:
|
f2, summary, oarlength, inboard, fileformat = handle_nonpainsled(
|
||||||
f2, summary, oarlength, inboard, fileformat = handle_nonpainsled(
|
f2,
|
||||||
f2,
|
fileformat,
|
||||||
fileformat,
|
summary=summary
|
||||||
summary=summary
|
)
|
||||||
)
|
if not f2:
|
||||||
if not f2:
|
message = 'Something went wrong'
|
||||||
message = 'Something went wrong'
|
|
||||||
return (0, message, '')
|
|
||||||
except Exception as e:
|
|
||||||
errorstring = str(sys.exc_info()[0])
|
|
||||||
message = 'Something went wrong: ' + e.message
|
|
||||||
return (0, message, '')
|
return (0, message, '')
|
||||||
|
|
||||||
dosummary = (fileformat != 'fit' and 'speedcoach2' not in fileformat)
|
dosummary = (fileformat != 'fit' and 'speedcoach2' not in fileformat)
|
||||||
|
|||||||
@@ -316,7 +316,10 @@ def get_workout(user,stravaid):
|
|||||||
coords = get_strava_stream(r,'latlng',stravaid)
|
coords = get_strava_stream(r,'latlng',stravaid)
|
||||||
power = get_strava_stream(r,'power',stravaid)
|
power = get_strava_stream(r,'power',stravaid)
|
||||||
|
|
||||||
nr_rows = len(t)
|
if t is not None:
|
||||||
|
nr_rows = len(t)
|
||||||
|
else:
|
||||||
|
return(0,"Error: Time data wasnt found")
|
||||||
|
|
||||||
if nr_rows == 0:
|
if nr_rows == 0:
|
||||||
return (0,"Error: Time data had zero length")
|
return (0,"Error: Time data had zero length")
|
||||||
@@ -701,7 +704,10 @@ def handle_strava_import_stroke_data(title,
|
|||||||
coords = get_strava_stream(r,'latlng',stravaid)
|
coords = get_strava_stream(r,'latlng',stravaid)
|
||||||
power = get_strava_stream(r,'power',stravaid)
|
power = get_strava_stream(r,'power',stravaid)
|
||||||
|
|
||||||
nr_rows = len(t)
|
if t is not None:
|
||||||
|
nr_rows = len(t)
|
||||||
|
else:
|
||||||
|
return 0
|
||||||
|
|
||||||
if nr_rows == 0:
|
if nr_rows == 0:
|
||||||
return 0
|
return 0
|
||||||
|
|||||||
BIN
Binary file not shown.
Reference in New Issue
Block a user