Private
Public Access
1
0
This commit is contained in:
Sander Roosendaal
2020-05-06 22:21:58 +02:00
parent 86eea03db2
commit 9e672ef44d

View File

@@ -4718,7 +4718,10 @@ def history_view(request,userid=0):
wmeters, whours, wminutes = get_totals(a_workouts)
ddict = {}
ddict['id'] = wtype
ddict['wtype'] = mytypes.workouttypes_ordered[wtype]
try:
ddict['wtype'] = mytypes.workouttypes_ordered[wtype]
except KeyError:
ddict['wtype'] = wtype
ddict['distance'] = wmeters
ddict['duration'] = "{whours}:{wminutes:02d}".format(
whours=whours,
@@ -4847,7 +4850,11 @@ def history_view_data(request,userid=0):
a_workouts = g_workouts.filter(workouttype=wtype)
wmeters, whours, wminutes = get_totals(a_workouts)
ddict = {}
ddict['wtype'] = mytypes.workouttypes_ordered[wtype]
try:
ddict['wtype'] = mytypes.workouttypes_ordered[wtype]
except KeyError:
ddict['wtype'] = wtype
ddict['id'] = wtype
ddict['distance'] = wmeters
ddict['duration'] = "{whours}:{wminutes:02d}".format(