Private
Public Access
1
0

changes in plan and payment around instant plans

This commit is contained in:
Sander Roosendaal
2021-11-04 16:30:45 +01:00
parent 4a6bceae71
commit 4a772ed409
3 changed files with 7 additions and 3 deletions

View File

@@ -249,6 +249,8 @@ def purchase_checkouts_view(request):
messages.error(request,"There was an error in the payment form")
url = reverse("purchase_checkouts_view")
return HttpResponseRedirect(url)
else:
messages.error(request,"There was an error in the payment form")
url = reverse('rower_select_instantplan') # pragma: no cover
if 'plan' in request.POST: # pragma: no cover

View File

@@ -2670,6 +2670,8 @@ def rower_view_instantplan(request,id='',userid=0):
create_sessions_from_json(plansteps,r,startdate,r.user)
messages.info(request,'Your Sessions have been added')
url = reverse('plannedsessions_view')
timeperiod = startdate.strftime('%Y-%m-%d')+'/'+enddate.strftime('%Y-%m-%d')
url = url+'?when='+timeperiod
@@ -2745,7 +2747,7 @@ def add_instantplan_view(request):
if not request.user.is_staff: # pragma: no cover
raise PermissionDenied("Not Allowed")
r = getrequestrower(request)
r = request.user.rower
if request.method == 'POST': # pragma: no cover
form = InstantPlanForm(request.POST,request.FILES)