From 4d1035ef04696d3ea3a0dbb57f555e9ec40cadc1 Mon Sep 17 00:00:00 2001
From: Sander Roosendaal
Date: Thu, 11 Nov 2021 17:49:49 +0100
Subject: [PATCH 1/2] fix type
---
rowers/templates/instantplans.html | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/rowers/templates/instantplans.html b/rowers/templates/instantplans.html
index 2506fc8c..17c076b8 100644
--- a/rowers/templates/instantplans.html
+++ b/rowers/templates/instantplans.html
@@ -19,7 +19,7 @@
{% if rower.eurocredits %}
- Your have discount vouchers for an mount of {{ rower.eurocredits }}€. You
+ Your have discount vouchers for an amount of {{ rower.eurocredits }}€. You
will get discount for up to this amount on any paid plan.
{% endif %}
From 83d9e0540abd969e1c2d5bc63b1d636e9deec590 Mon Sep 17 00:00:00 2001
From: Sander Roosendaal
Date: Sun, 14 Nov 2021 09:02:41 +0100
Subject: [PATCH 2/2] d
---
rowers/views/planviews.py | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/rowers/views/planviews.py b/rowers/views/planviews.py
index 6a4f1f5a..e01d1460 100644
--- a/rowers/views/planviews.py
+++ b/rowers/views/planviews.py
@@ -2576,7 +2576,10 @@ def rower_view_instantplan(request,id='',userid=0):
raise Http404("Plan does not exist")
plan = InstantPlan.objects.get(uuid=id)
- discountedprice = credits.discounted(plan.price,r)
+ try:
+ discountedprice = credits.discounted(plan.price,r)
+ except AttributeError:
+ discountedprice = plan.price
authorizationstring = 'Bearer '+settings.WORKOUTS_FIT_TOKEN
url = settings.WORKOUTS_FIT_URL+"/trainingplan/"+id