added check of rower plan to multi compare
This commit is contained in:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user