fix
This commit is contained in:
@@ -33,7 +33,7 @@ from rq.exceptions import NoSuchJobError
|
||||
import threading
|
||||
import redis
|
||||
import colorsys
|
||||
|
||||
import re
|
||||
import zipfile
|
||||
import bleach
|
||||
import arrow
|
||||
|
||||
@@ -5234,6 +5234,8 @@ def workout_upload_api(request):
|
||||
r = None
|
||||
if form.is_valid():
|
||||
t = form.cleaned_data['title']
|
||||
t = re.sub('\r',' ',t)
|
||||
t = re.sub('\n',' ',t)
|
||||
boattype = form.cleaned_data['boattype']
|
||||
workouttype = form.cleaned_data['workouttype']
|
||||
try:
|
||||
@@ -6701,6 +6703,7 @@ def workout_summary_edit_view(request, id, message="", successmessage=""
|
||||
vals = None
|
||||
# feeling lucky / ruptures
|
||||
if request.method == 'POST' and "ruptures" in request.POST:
|
||||
try:
|
||||
df = pd.DataFrame({
|
||||
'spm': rowdata.df[' Cadence (stokes/min)'],
|
||||
'power': rowdata.df[' Power (watts)'],
|
||||
@@ -6735,6 +6738,9 @@ def workout_summary_edit_view(request, id, message="", successmessage=""
|
||||
intervalString = s
|
||||
form = SummaryStringForm(initial={'intervalstring': intervalString})
|
||||
|
||||
except KeyError:
|
||||
messages.error(request, "Nope, you were not lucky")
|
||||
|
||||
# We have submitted the mini language interpreter
|
||||
if request.method == 'POST' and "intervalstring" in request.POST:
|
||||
form = SummaryStringForm(request.POST)
|
||||
|
||||
Reference in New Issue
Block a user