Private
Public Access
1
0
This commit is contained in:
2023-07-20 11:00:31 +02:00
parent f7e8e791d2
commit 3c92132dbc
5 changed files with 10 additions and 7 deletions

View File

@@ -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))