bug fix
This commit is contained in:
@@ -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(
|
||||
|
||||
Reference in New Issue
Block a user