fixes
This commit is contained in:
BIN
rowers/tests/testdata/testdata.tcx.gz
vendored
BIN
rowers/tests/testdata/testdata.tcx.gz
vendored
Binary file not shown.
@@ -2994,7 +2994,7 @@ def instroke_chart_interactive(request, id=0, analysis=0, userid=0):
|
|||||||
activeminutesmax = int(instroke_analysis.end_second/60.)
|
activeminutesmax = int(instroke_analysis.end_second/60.)
|
||||||
spm_min = instroke_analysis.spm_min
|
spm_min = instroke_analysis.spm_min
|
||||||
spm_max = instroke_analysis.spm_max
|
spm_max = instroke_analysis.spm_max
|
||||||
except (InStrokeAnalysis.DoesNotExist, ValueError):
|
except ValueError:
|
||||||
metric = instrokemetrics[0]
|
metric = instrokemetrics[0]
|
||||||
spm_min = 15
|
spm_min = 15
|
||||||
spm_max = 45
|
spm_max = 45
|
||||||
@@ -3002,11 +3002,22 @@ def instroke_chart_interactive(request, id=0, analysis=0, userid=0):
|
|||||||
notes = ''
|
notes = ''
|
||||||
activeminutesmax = int(rowdata.duration/60.)
|
activeminutesmax = int(rowdata.duration/60.)
|
||||||
activeminutesmin = 0
|
activeminutesmin = 0
|
||||||
|
except InStrokeAnalysis.DoesNotExist:
|
||||||
|
instroke_analysis = InStrokeAnalysis(
|
||||||
|
workout = w,
|
||||||
|
metric = instrokemetrics[0],
|
||||||
|
spm_min = 15,
|
||||||
|
spm_max = 45,
|
||||||
|
name = '',
|
||||||
|
notes = '',
|
||||||
|
activeminutesmax = int(rowdata.duration/60.),
|
||||||
|
activeminutesmin = 0
|
||||||
|
)
|
||||||
|
instroke_analysis.save()
|
||||||
|
analysis = instroke_analysis.id
|
||||||
|
|
||||||
else:
|
else:
|
||||||
|
|
||||||
metric = instrokemetrics[0]
|
metric = instrokemetrics[0]
|
||||||
|
|
||||||
spm_min = 15
|
spm_min = 15
|
||||||
spm_max = 45
|
spm_max = 45
|
||||||
name = ''
|
name = ''
|
||||||
@@ -3052,6 +3063,7 @@ def instroke_chart_interactive(request, id=0, analysis=0, userid=0):
|
|||||||
rower=w.user,
|
rower=w.user,
|
||||||
)
|
)
|
||||||
else:
|
else:
|
||||||
|
instroke_analysis = InStrokeAnalysis.objects.get(id=analysis)
|
||||||
instroke_analysis.workout = w
|
instroke_analysis.workout = w
|
||||||
instroke_analysis.metric = metric
|
instroke_analysis.metric = metric
|
||||||
instroke_analysis.name = name
|
instroke_analysis.name = name
|
||||||
|
|||||||
Reference in New Issue
Block a user