cosmetical fixes
This commit is contained in:
@@ -3039,7 +3039,7 @@ def instroke_chart_interactive(request, id=0, analysis=0, userid=0):
|
||||
div = get_call()
|
||||
|
||||
|
||||
|
||||
dosave = False
|
||||
if request.method == 'POST':
|
||||
form = InstrokeForm(request.POST,choices=instrokemetrics)
|
||||
if form.is_valid():
|
||||
@@ -3079,6 +3079,7 @@ def instroke_chart_interactive(request, id=0, analysis=0, userid=0):
|
||||
instroke_analysis.rower=w.user
|
||||
|
||||
instroke_analysis.save()
|
||||
dosave = True
|
||||
messages.info(request,'In-Stroke Analysis saved')
|
||||
|
||||
|
||||
@@ -3097,6 +3098,7 @@ def instroke_chart_interactive(request, id=0, analysis=0, userid=0):
|
||||
)
|
||||
|
||||
instroke_analysis.save()
|
||||
dosave = True
|
||||
messages.info(request,'In-Stroke Analysis saved')
|
||||
|
||||
|
||||
@@ -3141,6 +3143,9 @@ def instroke_chart_interactive(request, id=0, analysis=0, userid=0):
|
||||
|
||||
if totaltime > 0:
|
||||
avg_speed = totaldist/totaltime
|
||||
if dosave:
|
||||
instroke_analysis.average_boatspeed = avg_speed
|
||||
instroke_analysis.save()
|
||||
|
||||
intervaldata = {
|
||||
'itime': itime,
|
||||
|
||||
Reference in New Issue
Block a user