fix emailprocessing bug
This commit is contained in:
@@ -4632,7 +4632,7 @@ def workout_upload_api(request):
|
||||
q = request.POST
|
||||
post_data = {k: q.getlist(k) if len(q.getlist(k))>1 else v for k, v in q.items()}
|
||||
|
||||
|
||||
|
||||
# only allow local host
|
||||
hostt = request.get_host().split(':')
|
||||
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:
|
||||
r = None
|
||||
for rwr in Rower.objects.all():
|
||||
if post_data['useremail'] in rwr.emailalternatives:
|
||||
r = rwr
|
||||
break
|
||||
if rwr.emailalternatives is not None:
|
||||
if post_data['useremail'] in rwr.emailalternatives:
|
||||
r = rwr
|
||||
break
|
||||
if post_data['useremail'] not in r.emailalternatives:
|
||||
message = {'status':'false','message':'could not find user'}
|
||||
return JSONResponse(status=400,data=message)
|
||||
|
||||
Reference in New Issue
Block a user