From f840136e1ecbfeb2161aaa5a4e9c3ccd0a809010 Mon Sep 17 00:00:00 2001 From: Timothy Hobbs Date: Wed, 7 Jul 2021 20:38:20 +0200 Subject: [PATCH] Don't crash if use email is None --- helpdesk/views/staff.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/helpdesk/views/staff.py b/helpdesk/views/staff.py index 62e7d8e5..5918197d 100644 --- a/helpdesk/views/staff.py +++ b/helpdesk/views/staff.py @@ -398,7 +398,10 @@ def return_ticketccstring_and_show_subscribe(user, ticket): # create the ticketcc_string and check whether current user is already # subscribed username = user.get_username().upper() - useremail = user.email.upper() + try: + useremail = user.email.upper() + except AttributeError: + useremail = "" strings_to_check = list() strings_to_check.append(username) strings_to_check.append(useremail)