mirror of
https://gitea.mueller.network/extern/django-helpdesk.git
synced 2025-01-28 00:38:45 +01:00
Fix issue where a django user may not have an associated email address and therefore get_email.py will barf
This commit is contained in:
parent
e197f313bd
commit
e8d1ffbe21
@ -373,9 +373,10 @@ def ticket_from_message(message, queue, logger):
|
|||||||
if cc:
|
if cc:
|
||||||
# get list of currently CC'd emails
|
# get list of currently CC'd emails
|
||||||
current_cc = TicketCC.objects.filter(ticket=ticket)
|
current_cc = TicketCC.objects.filter(ticket=ticket)
|
||||||
current_cc_emails = [x.email for x in current_cc]
|
current_cc_emails = [x.email for x in current_cc if x.email]
|
||||||
# get emails of any Users CC'd to email
|
# get emails of any Users CC'd to email, if defined
|
||||||
current_cc_users = [x.user.email for x in current_cc]
|
# (some Users may not have an associated email, e.g, when using LDAP)
|
||||||
|
current_cc_users = [x.user.email for x in current_cc if x.user and x.user.email]
|
||||||
# ensure submitter, assigned user, queue email not added
|
# ensure submitter, assigned user, queue email not added
|
||||||
other_emails = [queue.email_address]
|
other_emails = [queue.email_address]
|
||||||
if t.submitter_email:
|
if t.submitter_email:
|
||||||
|
Loading…
Reference in New Issue
Block a user