Private
Public Access
1
0

added check of rower plan to multi compare

This commit is contained in:
Sander Roosendaal
2017-06-13 22:29:29 +02:00
parent 0506eb36aa
commit 238bf867fb

View File

@@ -3127,6 +3127,8 @@ def team_comparison_select(request,
r = getrower(request.user)
except Rower.DoesNotExist:
raise Http404("Rower doesn't exist")
if request.method == 'POST':
dateform = DateRangeForm(request.POST)
@@ -3158,6 +3160,9 @@ def team_comparison_select(request,
except Team.DoesNotExist:
theteam = 0
if r.rowerplan == 'basic' and theteam==0:
raise Http404("Not allowed")
if theteam and (theteam.viewing == 'allmembers' or theteam.manager == request.user):
workouts = Workout.objects.filter(team=theteam,
startdatetime__gte=startdate,