From 86eea03db2e38ad06ea7ab8a1f68585d13bfe4c8 Mon Sep 17 00:00:00 2001 From: Sander Roosendaal Date: Wed, 6 May 2020 22:17:31 +0200 Subject: [PATCH] bug fix --- rowers/views/analysisviews.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/rowers/views/analysisviews.py b/rowers/views/analysisviews.py index d2293e28..3b1fda4d 100644 --- a/rowers/views/analysisviews.py +++ b/rowers/views/analysisviews.py @@ -4706,7 +4706,8 @@ def history_view(request,userid=0): typechoices = [("All","All")] for wtype in wtypes: - typechoices.append((wtype,mytypes.workouttypes_ordered[wtype])) + if wtype in mytypes.checktypes: + typechoices.append((wtype,mytypes.workouttypes_ordered[wtype])) form.fields['workouttype'].choices = typechoices @@ -4730,7 +4731,7 @@ def history_view(request,userid=0): # interactive hr pie chart totalscript = '' totaldiv = get_call() - + totalsdict = {} totalsdict['duration'] = "{totalhours}:{totalminutes}".format( totalhours=totalhours, @@ -4837,7 +4838,8 @@ def history_view_data(request,userid=0): typechoices = [("All","All")] for wtype in wtypes: - typechoices.append((wtype,mytypes.workouttypes_ordered[wtype])) + if wtype in mytypes.checktypes: + typechoices.append((wtype,mytypes.workouttypes_ordered[wtype])) listofdicts = []