fix
This commit is contained in:
@@ -117,14 +117,14 @@ def add_workout_from_data(userid, nkid, data, strokedata, source='nk', splitdata
|
||||
session.headers.update(newHeaders)
|
||||
|
||||
response = session.post(UPLOAD_SERVICE_URL, json=uploadoptions)
|
||||
|
||||
|
||||
if response.status_code != 200: # pragma: no cover
|
||||
return 0, response.text
|
||||
|
||||
try:
|
||||
workoutid = response.json()['id']
|
||||
except KeyError: # pragma: no cover
|
||||
workoutid = 1
|
||||
workoutid = 0
|
||||
|
||||
# dologging('nklog.log','Workout ID {id}'.format(id=workoutid))
|
||||
|
||||
|
||||
Reference in New Issue
Block a user