If user does not exist, catch exception

User = None
This commit is contained in:
Sachi King 2017-04-02 11:49:12 +10:00
parent 0517c61542
commit de08802d5b

View file

@ -137,6 +137,8 @@ def proposal_speaker_manage(request, pk):
# check if email is on the site now
try:
user = User.objects.get(email=email_address)
except ObjectDoesNotExist:
user = None
except MultipleObjectsReturned:
# FIXME: This is not handled in the previous code, so I'm not
# going to frett on this now, but should be handled as it is