s
This commit is contained in:
@@ -2430,18 +2430,21 @@ class PlannedSession(models.Model):
|
||||
|
||||
# interval string
|
||||
if self.interval_string:
|
||||
dct = trainingparser.parsetodict(self.interval_string)
|
||||
dct = [item for item in dct if item['value'] != 0]
|
||||
dct = trainingparser.tofitdict(dct)
|
||||
for step in dct['steps']:
|
||||
try:
|
||||
step['targetValue'] = int(step['targetValue'])
|
||||
step['targetValueLow'] = int(step['targetValueHigh'])
|
||||
step['targetValueHigh'] = int(step['targetValueLow'])
|
||||
try:
|
||||
dct = trainingparser.parsetodict(self.interval_string)
|
||||
dct = [item for item in dct if item['value'] != 0]
|
||||
dct = trainingparser.tofitdict(dct)
|
||||
for step in dct['steps']:
|
||||
try:
|
||||
step['targetValue'] = int(step['targetValue'])
|
||||
step['targetValueLow'] = int(step['targetValueHigh'])
|
||||
step['targetValueHigh'] = int(step['targetValueLow'])
|
||||
|
||||
except KeyError:
|
||||
pass
|
||||
self.steps = dct
|
||||
except KeyError:
|
||||
pass
|
||||
self.steps = dct
|
||||
except:
|
||||
pass
|
||||
|
||||
# sort units
|
||||
if self.sessionmode == 'distance':
|
||||
|
||||
Reference in New Issue
Block a user