From 2b816b88ab1aee20ce5c9caf8ac065f39069f305 Mon Sep 17 00:00:00 2001 From: Sander Roosendaal Date: Tue, 9 Mar 2021 08:28:40 +0100 Subject: [PATCH] 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,