Removed notifications_to_be_sent list

The whole loop appeared to be doing nothing other than appending email
addresses to a list, which was never used.
This commit is contained in:
Martin Whitehouse 2022-07-25 01:22:05 +02:00
parent e863609cbe
commit 1ac78955c0
No known key found for this signature in database
GPG Key ID: 3FCE1D3E9DEC09C1

View File

@ -466,16 +466,6 @@ def create_object_from_email_message(message, ticket_id, payload, files, logger)
new_ticket_ccs = []
new_ticket_ccs.append(create_ticket_cc(ticket, to_list + cc_list))
notifications_to_be_sent = [sender_email]
if queue.enable_notifications_on_email_events and len(notifications_to_be_sent):
ticket_cc_list = TicketCC.objects.filter(
ticket=ticket).all().values_list('email', flat=True)
for email_address in ticket_cc_list:
notifications_to_be_sent.append(email_address)
autoreply = is_autoreply(message)
if autoreply:
logger.info(