From 0dfcee6e424fd50ce731f8a23fbae6f7abbb1e91 Mon Sep 17 00:00:00 2001 From: Sander Roosendaal Date: Mon, 8 Mar 2021 13:06:04 +0100 Subject: [PATCH 1/2] slight wording change --- rowers/templates/plannedsessioncreate.html | 2 +- rowers/templates/plannedsessionteamcreate.html | 2 +- rowers/templates/plannedsessiontemplatecreate.html | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/rowers/templates/plannedsessioncreate.html b/rowers/templates/plannedsessioncreate.html index f18b1ff9..b51ffed7 100644 --- a/rowers/templates/plannedsessioncreate.html +++ b/rowers/templates/plannedsessioncreate.html @@ -23,7 +23,7 @@ {% csrf_token %}

-

+

diff --git a/rowers/templates/plannedsessionteamcreate.html b/rowers/templates/plannedsessionteamcreate.html index c72c08b3..784f3881 100644 --- a/rowers/templates/plannedsessionteamcreate.html +++ b/rowers/templates/plannedsessionteamcreate.html @@ -27,7 +27,7 @@

-

+

diff --git a/rowers/templates/plannedsessiontemplatecreate.html b/rowers/templates/plannedsessiontemplatecreate.html index ca906446..573dfdca 100644 --- a/rowers/templates/plannedsessiontemplatecreate.html +++ b/rowers/templates/plannedsessiontemplatecreate.html @@ -28,7 +28,7 @@

-

+

From 2b816b88ab1aee20ce5c9caf8ac065f39069f305 Mon Sep 17 00:00:00 2001 From: Sander Roosendaal Date: Tue, 9 Mar 2021 08:28:40 +0100 Subject: [PATCH 2/2] fix --- rowers/utils.py | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/rowers/utils.py b/rowers/utils.py index 72ce934f..ec6efdba 100644 --- a/rowers/utils.py +++ b/rowers/utils.py @@ -772,7 +772,8 @@ def step_to_string(step): durationtype = step['durationType'] if step['durationValue'] == 0: - return '',type, -1, -1 + if durationtype not in ['RepeatUntilStepsCmplt','RepeatUntilHrLessThan','RepeatUntilHrGreaterThan']: + return '',type, -1, -1,1 if durationtype == 'Time': unit = 'min' @@ -976,8 +977,10 @@ def step_to_string(step): name = step['wkt_step_name'] - intensity = step['intensity'] - + try: + intensity = step['intensity'] + except KeyError: + intensity = 0 s = '{name} {intensity} {duration} {unit} {target} {repeat}'.format( nr = nr,