Private
Public Access
1
0
This commit is contained in:
2024-08-21 15:32:50 +02:00
parent f79291e44c
commit f7d64173f1
3 changed files with 13 additions and 7 deletions

Binary file not shown.

1
rowers/views/.#apiviews.py Symbolic link
View File

@@ -0,0 +1 @@
sander@rowsandall-2.3950:1723351739

View File

@@ -484,19 +484,24 @@ def strokedata_tcx(request):
with open(tcxfilename, 'w', encoding='utf-8') as xml_file:
xml_file.write(xml_string)
duration = totaltime_sec_to_string(total_duration)
duration = totaltime_sec_to_string(total_duration)
try:
startdatetime = arrow.get(start_time_str)
#startdatetime = dt.strptime(start_time_str, "%Y-%m-%dT%H:%M:%S%z")
startdate = startdatetime.date()
partofday = part_of_day(startdatetime.hour)
title = '{partofday} water'.format(partofday=partofday)
except Exception as e:
dologging('apilog.log','TCX error to get time')
dologging('apilog.log',e)
_ = myqueue(queuehigh, handle_sendemail_unrecognized, tcxfilename, "tcx parser")
w = Workout(user=request.user.rower,
date=startdate,
name=title,
duration=duration)
w.save()
w = Workout(user=request.user.rower,
date=startdate,
name=title,
duration=duration)
w.save()
# need workouttype, duration