SmartRow - waterrower - support
This commit is contained in:
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user