Private
Public Access
1
0
This commit is contained in:
2024-12-29 18:32:23 +01:00
parent 2a608b98dc
commit cbfbf8be8a
2 changed files with 4 additions and 2 deletions

View File

@@ -591,18 +591,20 @@ class IntervalsIntegration(SyncIntegration):
# got data
if data:
if data['category'].lower() not in ['workout', 'target']:
continue
ps.name = data['name']
try:
ps.comment = data['description']
except KeyError:
pass
ps.comment = ''
ps.startdate = arrow.get(data['start_date_local']).datetime
ps.enddate = arrow.get(data['end_date_local']).datetime
ps.preferreddate = arrow.get(data['start_date_local']).datetime
try:
ps.sessionsport = mytypes.intervalsmappinginv[data['type']]
except KeyError:
pass
ps.sessionsport = 'water'
ps.sessiontype = 'session'
ps.save()