Fix an error when creating a ticket with a submitter email that is shared by multiple users

This commit is contained in:
Benbb96 2020-10-08 22:34:45 +02:00
parent d7f4ca4137
commit 5b44a3aca6

View File

@ -752,7 +752,7 @@ class Ticket(models.Model):
User = get_user_model()
try:
return User.objects.get(email=self.submitter_email)
except User.DoesNotExist:
except (User.DoesNotExist, User.MultipleObjectsReturned):
return None
class Meta: