Private
Public Access
1
0

hotfix flexall data

This commit is contained in:
Sander Roosendaal
2018-06-12 20:02:21 +02:00
parent cab5216354
commit eab60762b6

View File

@@ -2981,9 +2981,12 @@ def cum_flex_data(
'deltadays':-1, 'deltadays':-1,
}): }):
def_options = options
if 'options' in request.session: if 'options' in request.session:
options = request.session['options'] options = request.session['options']
try:
workouttypes = options['workouttypes'] workouttypes = options['workouttypes']
rankingonly = options['rankingonly'] rankingonly = options['rankingonly']
includereststrokes = options['includereststrokes'] includereststrokes = options['includereststrokes']
@@ -2996,6 +2999,20 @@ def cum_flex_data(
startdatestring = options['startdatestring'] startdatestring = options['startdatestring']
enddatestring = options['enddatestring'] enddatestring = options['enddatestring']
deltadays = options['deltadays'] deltadays = options['deltadays']
except KeyError:
workouttypes = def_options['workouttypes']
rankingonly = def_options['rankingonly']
includereststrokes = def_options['includereststrokes']
waterboattype = def_options['waterboattype']
workstrokesonly = not includereststrokes
theuser = def_options['theuser']
xparam = def_options['xparam']
yparam1 = def_options['yparam1']
yparam2 = def_options['yparam2']
startdatestring = def_options['startdatestring']
enddatestring = def_options['enddatestring']
deltadays = def_options['deltadays']
try: try:
@@ -3047,7 +3064,7 @@ def cum_flex_data(
yparam2=yparam2, yparam2=yparam2,
promember=promember, promember=promember,
workstrokesonly=workstrokesonly, workstrokesonly=workstrokesonly,
rankingpiece__in=rankingpiece) )
script = res[0] script = res[0]
div = res[1] div = res[1]
else: else:
@@ -3629,7 +3646,7 @@ def addmanual_view(request):
try: try:
rankingpiece = form.cleaned_data['rankingpiece'] rankingpiece = form.cleaned_data['rankingpiece']
except KeyError: except KeyError:
rankingpiece =- Workout.objects.get(id=id).rankingpiece rankingpiece = False
if private: if private:
privacy = 'private' privacy = 'private'