Merge branch 'release/v18.9.15'
This commit is contained in:
@@ -682,8 +682,11 @@ def createc2workoutdata(w):
|
|||||||
w.timezone = 'UTC'
|
w.timezone = 'UTC'
|
||||||
w.save()
|
w.save()
|
||||||
|
|
||||||
|
try:
|
||||||
wendtime = w.startdatetime.astimezone(pytz.timezone(
|
wendtime = w.startdatetime.astimezone(pytz.timezone(
|
||||||
w.timezone))+datetime.timedelta(seconds=makeseconds(durationstr))
|
w.timezone))+datetime.timedelta(seconds=makeseconds(durationstr))
|
||||||
|
except UnknownTimeZoneError:
|
||||||
|
wendtime = w.startdatetime+datetime.timedelta(seconds=makeseconds(durationstr))
|
||||||
|
|
||||||
data = {
|
data = {
|
||||||
"type": mytypes.c2mapping[workouttype],
|
"type": mytypes.c2mapping[workouttype],
|
||||||
|
|||||||
@@ -876,6 +876,7 @@ def checkduplicates(r, workoutdate, workoutstartdatetime, workoutenddatetime):
|
|||||||
t = ww.duration
|
t = ww.duration
|
||||||
delta = datetime.timedelta(
|
delta = datetime.timedelta(
|
||||||
hours=t.hour, minutes=t.minute, seconds=t.second)
|
hours=t.hour, minutes=t.minute, seconds=t.second)
|
||||||
|
if ww.startdatetime is not None:
|
||||||
enddatetime = ww.startdatetime+delta
|
enddatetime = ww.startdatetime+delta
|
||||||
if enddatetime > workoutstartdatetime:
|
if enddatetime > workoutstartdatetime:
|
||||||
ws2.append(ww)
|
ws2.append(ww)
|
||||||
|
|||||||
@@ -271,6 +271,13 @@ def strokedatajson_v3(request):
|
|||||||
|
|
||||||
startdatetime = pendulum.parse(startdatetime)
|
startdatetime = pendulum.parse(startdatetime)
|
||||||
|
|
||||||
|
dologging('apilog.log',workouttype)
|
||||||
|
dologging('apilog.log',boattype)
|
||||||
|
dologging('apilog.log',notes)
|
||||||
|
dologging('apilog.log',title)
|
||||||
|
dologging('apilog.log',totalDistance)
|
||||||
|
dologging('apilog.log',elapsedTime)
|
||||||
|
|
||||||
df = pd.DataFrame()
|
df = pd.DataFrame()
|
||||||
try:
|
try:
|
||||||
strokes = request.data['strokes']
|
strokes = request.data['strokes']
|
||||||
@@ -298,7 +305,10 @@ def strokedatajson_v3(request):
|
|||||||
_ = data.to_csv(csvfilename, index_label='index', compression='gzip')
|
_ = data.to_csv(csvfilename, index_label='index', compression='gzip')
|
||||||
|
|
||||||
duration = datetime.time(0,0,1)
|
duration = datetime.time(0,0,1)
|
||||||
w = Workout(user=request.user.rower,date=timezone.now().date(),duration=duration)
|
w = Workout(
|
||||||
|
user=request.user.rower,
|
||||||
|
date=timezone.now().date(),
|
||||||
|
duration=duration)
|
||||||
w.save()
|
w.save()
|
||||||
|
|
||||||
uploadoptions = {
|
uploadoptions = {
|
||||||
|
|||||||
@@ -5211,7 +5211,6 @@ def workout_upload_api(request):
|
|||||||
# sync related IDs
|
# sync related IDs
|
||||||
c2id = post_data.get('c2id', '')
|
c2id = post_data.get('c2id', '')
|
||||||
workoutid = post_data.get('id','')
|
workoutid = post_data.get('id','')
|
||||||
|
|
||||||
startdatetime = post_data.get('startdatetime', '')
|
startdatetime = post_data.get('startdatetime', '')
|
||||||
oarlockfirmware = post_data.get('oarlockfirmware', None)
|
oarlockfirmware = post_data.get('oarlockfirmware', None)
|
||||||
inboard = post_data.get('inboard', None)
|
inboard = post_data.get('inboard', None)
|
||||||
|
|||||||
Reference in New Issue
Block a user