bug fix
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user