diff --git a/rowers/views.py b/rowers/views.py index d163a4d5..ad59ba91 100644 --- a/rowers/views.py +++ b/rowers/views.py @@ -2646,9 +2646,21 @@ def cum_flex(request,theuser=0, if 'options' in request.session: options = request.session['options'] - workouttypes = options['workouttypes'] - includereststrokes = options['includereststrokes'] - waterboattype = options['waterboattype'] + try: + workouttypes = options['workouttypes'] + except KeyError: + workouttypes = ['rower','dynamic','slides'] + + try: + includereststrokes = options['includereststrokes'] + except KeyError: + includereststrokes = False + + try: + waterboattype = options['waterboattype'] + except KeyError: + waterboattype = ['1x','2x','2-','4x','4-','8+'] + workstrokesonly = not includereststrokes @@ -6501,9 +6513,19 @@ def cumstats(request,theuser=0, if 'options' in request.session: options = request.session['options'] - workouttypes = options['workouttypes'] - includereststrokes = options['includereststrokes'] + try: + workouttypes = options['workouttypes'] + except KeyError: + workouttypes = ['rower','dynamic','slides'] + + try: + includereststrokes = options['includereststrokes'] + except KeyError: + includereststrokes = False + + workstrokesonly = not includereststrokes + checktypes = ['water','rower','dynamic','slides','skierg', 'paddle','snow','other','coastal'] waterboattype = ['1x','2x','2-','4x','4-','8+']