Private
Public Access
1
0
This commit is contained in:
Sander Roosendaal
2020-02-15 14:15:36 +01:00
parent 338b50452b
commit f0c6d0ca70

View File

@@ -12,6 +12,7 @@ import rowers.mytypes as mytypes
import numpy
from urllib.parse import urlparse, parse_qs
from json.decoder import JSONDecodeError
def default(o):
if isinstance(o, numpy.int64): return int(o)
@@ -4400,7 +4401,7 @@ def workout_upload_api(request):
json_data = json.loads(request.body)
secret = json_data['secret']
post_data = json_data
except KeyError:
except (KeyError,JSONDecodeError):
post_data = request.POST
# only allow local host