Private
Public Access
1
0

fix emailprocessing bug

This commit is contained in:
Sander Roosendaal
2020-10-10 09:33:43 +02:00
parent 3c99e59afb
commit b06cddd2c2

View File

@@ -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)