bug fix
This commit is contained in:
@@ -12,6 +12,7 @@ import rowers.mytypes as mytypes
|
|||||||
import numpy
|
import numpy
|
||||||
|
|
||||||
from urllib.parse import urlparse, parse_qs
|
from urllib.parse import urlparse, parse_qs
|
||||||
|
from json.decoder import JSONDecodeError
|
||||||
|
|
||||||
def default(o):
|
def default(o):
|
||||||
if isinstance(o, numpy.int64): return int(o)
|
if isinstance(o, numpy.int64): return int(o)
|
||||||
@@ -4400,7 +4401,7 @@ def workout_upload_api(request):
|
|||||||
json_data = json.loads(request.body)
|
json_data = json.loads(request.body)
|
||||||
secret = json_data['secret']
|
secret = json_data['secret']
|
||||||
post_data = json_data
|
post_data = json_data
|
||||||
except KeyError:
|
except (KeyError,JSONDecodeError):
|
||||||
post_data = request.POST
|
post_data = request.POST
|
||||||
|
|
||||||
# only allow local host
|
# only allow local host
|
||||||
|
|||||||
Reference in New Issue
Block a user