diff --git a/rowers/dataprep.py b/rowers/dataprep.py index eaab5f0b..d360703a 100644 --- a/rowers/dataprep.py +++ b/rowers/dataprep.py @@ -2028,7 +2028,7 @@ def handle_nonpainsled(f2, fileformat, summary='',startdatetime='',empowerfirmwa return (f2, summary, oarlength, inboard, fileformat, impeller) # Create new workout from file and store it in the database -# This routine should be used everywhere in views.py +# This routine should be used everywhere in views.py def get_workouttype_from_fit(filename,workouttype='water'): try: @@ -2205,7 +2205,9 @@ def new_workout_from_file(r, f2, if (fileformat == 'fit'): # pragma: no cover workouttype = get_workouttype_from_fit(f2,workouttype=workouttype) if (fileformat == 'tcx'): - workouttype = get_workouttype_from_tcx(f2,workouttype=workouttype) + workouttype_from_tcx = get_workouttype_from_tcx(f2,workouttype=workouttype) + if workouttype not in mytypes.otwtypes and workouttype_from_tcx not in mytypes.otwtypes: + workouttype = workouttype_from_tcx # handle non-Painsled by converting it to painsled compatible CSV if (fileformat != 'csv'): diff --git a/rowers/tests/testdata/testdata.tcx.gz b/rowers/tests/testdata/testdata.tcx.gz deleted file mode 100644 index 9a25477d..00000000 Binary files a/rowers/tests/testdata/testdata.tcx.gz and /dev/null differ