Merge branch 'release/v22.1.32'
This commit is contained in:
@@ -2302,7 +2302,7 @@ def dataplep(rowdatadf, id=0, inboard=0.88, forceunit='lbs', bands=True, barchar
|
||||
finish = df['finish']
|
||||
peakforceangle = df['peakforceangle']
|
||||
arclength = (inboard - 0.05) * (np.radians(finish) - np.radians(catch))
|
||||
if arclength.mean() > 0:
|
||||
if arclength.mean() is not None and arclength.mean() > 0:
|
||||
drivelength = arclength
|
||||
else:
|
||||
drivelength = data['drivelength']
|
||||
|
||||
BIN
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