Private
Public Access
1
0

c2 import list

This commit is contained in:
Sander Roosendaal
2021-10-31 16:01:23 +01:00
parent 70e85d6665
commit a12fcfdd85
5 changed files with 58 additions and 14 deletions

View File

@@ -141,13 +141,13 @@ def c2_open(user):
return thetoken
def get_c2_workouts(rower,do_async=True):
def get_c2_workouts(rower,page=1,do_async=True):
try:
thetoken = c2_open(rower.user)
except NoTokenError: # pragma: no cover
return 0
res = get_c2_workout_list(rower.user,page=1)
res = get_c2_workout_list(rower.user,page=page)
if (res.status_code != 200): # pragma: no cover
return 0
@@ -634,7 +634,7 @@ def createc2workoutdata(w):
try:
spmav = int(row.df[' Cadence (stokes/min)'][mask].mean())
hrav = int(row.df[' HRCur (bpm)'][mask].mean())
except ValuError:
except ValueError:
smpav = 0
try:
hrav = int(row.df[' HRCur (bpm)'][mask].mean())