Private
Public Access
1
0

fixing error

This commit is contained in:
2024-12-15 13:27:04 +01:00
parent 4a4de49a18
commit 19d0d54859

View File

@@ -242,25 +242,29 @@ class IntervalsIntegration(SyncIntegration):
workouts = []
for item in data:
i = item['id']
r = item['type']
d = item['distance']
ttot = seconds_to_duration(item['moving_time'])
s = item['start_date']
s2 = ''
c = item['name']
if i in known_interval_ids:
nnn = ''
else:
nnn = 'NEW'
try:
i = item['id']
r = item['type']
d = item['distance']
ttot = seconds_to_duration(item['moving_time'])
s = item['start_date']
s2 = ''
c = item['name']
if i in known_interval_ids:
nnn = ''
else:
nnn = 'NEW'
keys = ['id','distance','duration','starttime',
'rowtype','source','name','new']
keys = ['id','distance','duration','starttime',
'rowtype','source','name','new']
values = [i, d, ttot, s, r, s2, c, nnn]
values = [i, d, ttot, s, r, s2, c, nnn]
ress = dict(zip(keys, values))
workouts.append(ress)
except KeyError:
dologging('intervals.icu.log', item)
ress = dict(zip(keys, values))
workouts.append(ress)
return workouts