fix
This commit is contained in:
BIN
rowers/tests/testdata/testdata.tcx.gz
vendored
BIN
rowers/tests/testdata/testdata.tcx.gz
vendored
Binary file not shown.
1
rowers/views/.#apiviews.py
Symbolic link
1
rowers/views/.#apiviews.py
Symbolic link
@@ -0,0 +1 @@
|
||||
sander@rowsandall-2.3950:1723351739
|
||||
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user