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.)
|
||||
spm_min = instroke_analysis.spm_min
|
||||
spm_max = instroke_analysis.spm_max
|
||||
except (InStrokeAnalysis.DoesNotExist, ValueError):
|
||||
except ValueError:
|
||||
metric = instrokemetrics[0]
|
||||
spm_min = 15
|
||||
spm_max = 45
|
||||
@@ -3002,11 +3002,22 @@ def instroke_chart_interactive(request, id=0, analysis=0, userid=0):
|
||||
notes = ''
|
||||
activeminutesmax = int(rowdata.duration/60.)
|
||||
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:
|
||||
|
||||
metric = instrokemetrics[0]
|
||||
|
||||
spm_min = 15
|
||||
spm_max = 45
|
||||
name = ''
|
||||
@@ -3052,6 +3063,7 @@ def instroke_chart_interactive(request, id=0, analysis=0, userid=0):
|
||||
rower=w.user,
|
||||
)
|
||||
else:
|
||||
instroke_analysis = InStrokeAnalysis.objects.get(id=analysis)
|
||||
instroke_analysis.workout = w
|
||||
instroke_analysis.metric = metric
|
||||
instroke_analysis.name = name
|
||||
|
||||
Reference in New Issue
Block a user