From 93e8b3f07fda66bf224753c989f5447d7da3a978 Mon Sep 17 00:00:00 2001 From: Oliver Falk Date: Thu, 17 Nov 2022 12:26:08 +0100 Subject: [PATCH] Workaround for #89 --- ivatar/ivataraccount/views.py | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/ivatar/ivataraccount/views.py b/ivatar/ivataraccount/views.py index 2bb7711..b1dba83 100644 --- a/ivatar/ivataraccount/views.py +++ b/ivatar/ivataraccount/views.py @@ -1080,10 +1080,9 @@ class PasswordResetView(PasswordResetViewOriginal): user = None # Try to find the user via the normal user class - try: - user = User.objects.get(email=request.POST["email"]) - except ObjectDoesNotExist: - pass + # TODO: How to handle the case that multiple user accounts + # could have the same password set? + user = User.objects.filter(email=request.POST["email"]).first() # If we didn't find the user in the previous step, # try the ConfirmedEmail class instead.