Private
Public Access
1
0

manual import rp3 working

This commit is contained in:
Sander Roosendaal
2021-01-27 13:30:51 +01:00
parent 5e5518e176
commit 844b984fb1
10 changed files with 161 additions and 14 deletions

View File

@@ -178,6 +178,10 @@ def get_rp3_workout(user,workout_id,startdatetime=None):
r = Rower.objects.get(user=user)
auth_token = rp3_open(user)
if not startdatetime:
startdatetime = str(timezone.now())
status_code = download_rp3_file(url, auth_token, filename)
if status_code != 200:
@@ -192,6 +196,7 @@ def get_rp3_workout(user,workout_id,startdatetime=None):
'workouttype':'dynamic',
'boattype':'1x',
'rp3id':workout_id,
'startdatetime':startdatetime,
}
session = requests.session()