Private
Public Access
1
0
This commit is contained in:
Sander Roosendaal
2022-11-11 12:01:48 +01:00
parent c21bf161d2
commit e8bd4abc82
2 changed files with 12 additions and 0 deletions

View File

@@ -2661,6 +2661,13 @@ def rower_view_instantplan(request, id='', userid=0):
'id': id,
})
return HttpResponseRedirect(url)
if not can_plan(request.user):
messages.error(
request, 'You must be on a <a href="/rowers/paidplans">paid plan</a> to use free training plans')
url = reverse('rower_view_instantplan', kwargs={
'id': id,
})
return HttpResponseRedirect(url)
form = InstantPlanSelectForm(request.POST, targets=targets)