Don't crash if use email is None

This commit is contained in:
Timothy Hobbs 2021-07-07 20:38:20 +02:00
parent df05ce2b1f
commit f840136e1e

View File

@ -398,7 +398,10 @@ def return_ticketccstring_and_show_subscribe(user, ticket):
# create the ticketcc_string and check whether current user is already # create the ticketcc_string and check whether current user is already
# subscribed # subscribed
username = user.get_username().upper() username = user.get_username().upper()
try:
useremail = user.email.upper() useremail = user.email.upper()
except AttributeError:
useremail = ""
strings_to_check = list() strings_to_check = list()
strings_to_check.append(username) strings_to_check.append(username)
strings_to_check.append(useremail) strings_to_check.append(useremail)