Private
Public Access
1
0

SmartRow - waterrower - support

This commit is contained in:
Sander Roosendaal
2022-01-22 15:02:37 +01:00
parent a181f6f90d
commit 8d78444aae
6 changed files with 24 additions and 23 deletions

View File

@@ -2576,7 +2576,7 @@ def rower_view_instantplan(request,id='',userid=0):
plan = InstantPlan.objects.get(uuid=id)
try:
discountedprice = credits.discounted(plan.price,r)
except AttributeError:
except AttributeError: # pragma: no cover
discountedprice = plan.price
authorizationstring = 'Bearer '+settings.WORKOUTS_FIT_TOKEN
@@ -2625,7 +2625,7 @@ def rower_view_instantplan(request,id='',userid=0):
return HttpResponseRedirect(url)
# check if plan is free or credits are sufficient
if plan.price > 0:
if plan.price > 0: # pragma: no cover
if plan.price > r.eurocredits:
messages.error(request,'You did not have enough credit to purchase this plan')
url = reverse('rower_view_instantplan',kwargs={
@@ -2638,7 +2638,7 @@ def rower_view_instantplan(request,id='',userid=0):
if form.is_valid():
if plan.price > 0:
if plan.price > 0: # pragma: no cover
eurocredits = credits.withdraw(plan.price,r)
plansteps = response.json()