Merge branch 'hotfix/v1.87'
This commit is contained in:
@@ -156,7 +156,6 @@ def get_strava_workout(user,stravaid):
|
|||||||
url = "https://www.strava.com/api/v3/activities/"+str(stravaid)+"/streams/heartrate?resolution="+fetchresolution+"&series_type="+series_type
|
url = "https://www.strava.com/api/v3/activities/"+str(stravaid)+"/streams/heartrate?resolution="+fetchresolution+"&series_type="+series_type
|
||||||
hrjson = requests.get(url,headers=headers)
|
hrjson = requests.get(url,headers=headers)
|
||||||
url = "https://www.strava.com/api/v3/activities/"+str(stravaid)+"/streams/time?resolution="+fetchresolution+"&series_type="+series_type
|
url = "https://www.strava.com/api/v3/activities/"+str(stravaid)+"/streams/time?resolution="+fetchresolution+"&series_type="+series_type
|
||||||
print url
|
|
||||||
timejson = requests.get(url,headers=headers)
|
timejson = requests.get(url,headers=headers)
|
||||||
url = "https://www.strava.com/api/v3/activities/"+str(stravaid)+"/streams/velocity_smooth?resolution="+fetchresolution+"&series_type="+series_type
|
url = "https://www.strava.com/api/v3/activities/"+str(stravaid)+"/streams/velocity_smooth?resolution="+fetchresolution+"&series_type="+series_type
|
||||||
velojson = requests.get(url,headers=headers)
|
velojson = requests.get(url,headers=headers)
|
||||||
@@ -167,7 +166,7 @@ def get_strava_workout(user,stravaid):
|
|||||||
|
|
||||||
try:
|
try:
|
||||||
t = np.array(timejson.json()[0]['data'])
|
t = np.array(timejson.json()[0]['data'])
|
||||||
d = np.array(distancejson.json()[0]['data'])
|
d = np.array(distancejson.json()[1]['data'])
|
||||||
nr_rows = len(t)
|
nr_rows = len(t)
|
||||||
if nr_rows == 0:
|
if nr_rows == 0:
|
||||||
return (0,"Error: Time data had zero length")
|
return (0,"Error: Time data had zero length")
|
||||||
@@ -175,7 +174,6 @@ def get_strava_workout(user,stravaid):
|
|||||||
return (0,"something went wrong with the Strava import")
|
return (0,"something went wrong with the Strava import")
|
||||||
|
|
||||||
try:
|
try:
|
||||||
print spmjson.json()
|
|
||||||
spm = np.array(spmjson.json()[1]['data'])
|
spm = np.array(spmjson.json()[1]['data'])
|
||||||
except:
|
except:
|
||||||
spm = np.zeros(nr_rows)
|
spm = np.zeros(nr_rows)
|
||||||
|
|||||||
@@ -708,7 +708,6 @@ def add_workout_from_stdata(user,importid,data):
|
|||||||
title = "Imported data"
|
title = "Imported data"
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
res = splitstdata(data['distance'])
|
res = splitstdata(data['distance'])
|
||||||
|
|
||||||
distance = res[1]
|
distance = res[1]
|
||||||
|
|||||||
Reference in New Issue
Block a user