Merge branch 'release/v13.99' into master
This commit is contained in:
@@ -4632,7 +4632,7 @@ def workout_upload_api(request):
|
|||||||
q = request.POST
|
q = request.POST
|
||||||
post_data = {k: q.getlist(k) if len(q.getlist(k))>1 else v for k, v in q.items()}
|
post_data = {k: q.getlist(k) if len(q.getlist(k))>1 else v for k, v in q.items()}
|
||||||
|
|
||||||
|
|
||||||
# only allow local host
|
# only allow local host
|
||||||
hostt = request.get_host().split(':')
|
hostt = request.get_host().split(':')
|
||||||
if hostt[0] not in ['localhost','127.0.0.1','dev.rowsandall.com','rowsandall.com']:
|
if hostt[0] not in ['localhost','127.0.0.1','dev.rowsandall.com','rowsandall.com']:
|
||||||
@@ -4697,9 +4697,10 @@ def workout_upload_api(request):
|
|||||||
else:
|
else:
|
||||||
r = None
|
r = None
|
||||||
for rwr in Rower.objects.all():
|
for rwr in Rower.objects.all():
|
||||||
if post_data['useremail'] in rwr.emailalternatives:
|
if rwr.emailalternatives is not None:
|
||||||
r = rwr
|
if post_data['useremail'] in rwr.emailalternatives:
|
||||||
break
|
r = rwr
|
||||||
|
break
|
||||||
if post_data['useremail'] not in r.emailalternatives:
|
if post_data['useremail'] not in r.emailalternatives:
|
||||||
message = {'status':'false','message':'could not find user'}
|
message = {'status':'false','message':'could not find user'}
|
||||||
return JSONResponse(status=400,data=message)
|
return JSONResponse(status=400,data=message)
|
||||||
|
|||||||
Reference in New Issue
Block a user