Private
Public Access
1
0

small bug fixes

This commit is contained in:
Sander Roosendaal
2019-04-11 13:15:12 -04:00
parent f267cb4805
commit c0e5b0a522
3 changed files with 19 additions and 6 deletions

View File

@@ -4360,8 +4360,11 @@ def interactive_multiple_compare_chart(ids,xparam,yparam,plottype='line',
try:
tseconds = datadf.loc[:,'time']
except KeyError:
tseconds = datadf.loc[:,xparam]
try:
tseconds = datadf.loc[:,xparam]
except:
return ['','<p>A chart data error occurred</p>','','A chart data error occurred']
yparamname = axlabels[yparam]
#datadf = datadf[datadf[yparam] > 0]

Binary file not shown.

View File

@@ -910,7 +910,8 @@ def virtualevent_compare_view(request,id=0):
workouts = []
for id in workoutids:
try:
workouts.append(Workout.objects.get(id=encoded.decode_hex(id)))
workouts.append(Workout.objects.get(
id=encoder.decode_hex(id)))
except Workout.DoesNotExist:
pass
@@ -4858,14 +4859,23 @@ def workout_summary_edit_view(request,id,message="",successmessage=""
value_power = request.POST['value_power']
value_work = request.POST['value_work']
if powerorpace == 'power':
power = int(value_power)
try:
power = int(value_power)
except ValueError:
int(normp)
elif powerorpace == 'pace':
try:
pace_secs = float(value_pace)
except ValueError:
pace_secs = float(value_pace.replace(',','.'))
try:
pace_secs = float(value_pace.replace(',','.'))
except ValueError:
pace_secs = int(500./normv)
elif powerorpace == 'work':
work = int(value_work)
try:
work = int(value_work)
except ValueError:
work = int(normw)
if powerorpace == 'power' and power is not None:
try: