fixed repeatUntilStepsCmplt
This commit is contained in:
@@ -1067,6 +1067,14 @@ def get_workouts_session(r, ps):
|
||||
|
||||
return ws
|
||||
|
||||
def strcapitalize(s):
|
||||
if s is None:
|
||||
return None
|
||||
if isinstance(s, str):
|
||||
return s[0].upper() + s[1:]
|
||||
|
||||
return s
|
||||
|
||||
def correct_intensity(workout):
|
||||
# reads the steps and if the intensity is an integer, converts it to a string
|
||||
steps = workout['steps']
|
||||
@@ -1074,6 +1082,9 @@ def correct_intensity(workout):
|
||||
if 'intensity' in step:
|
||||
if isinstance(step['intensity'], int):
|
||||
step['intensity'] = intensitymap[step['intensity']]
|
||||
step['durationType'] = strcapitalize(step['durationType'])
|
||||
step['targetType'] = strcapitalize(step['targetType'])
|
||||
step['intensity'] = strcapitalize(step['intensity'])
|
||||
|
||||
return workout
|
||||
|
||||
|
||||
Reference in New Issue
Block a user