Fixe for Email Issue while pulling CC and ValueError for public homepage

This commit is contained in:
Dilip Dwarak 2018-01-11 14:49:21 -05:00
parent c791b79c31
commit cf85c3d9ab
2 changed files with 3 additions and 1 deletions

View File

@ -412,7 +412,7 @@ def ticket_from_message(message, queue, logger):
for ccemail in new_cc: for ccemail in new_cc:
tcc = TicketCC.objects.create( tcc = TicketCC.objects.create(
ticket=t, ticket=t,
email=ccemail, email=ccemail.replace('\n', ' ').replace('\r', ' '),
can_view=True, can_view=True,
can_update=False can_update=False
) )

View File

@ -84,6 +84,8 @@ def view_ticket(request):
ticket = Ticket.objects.get(id=ticket_id, submitter_email__iexact=email) ticket = Ticket.objects.get(id=ticket_id, submitter_email__iexact=email)
except ObjectDoesNotExist: except ObjectDoesNotExist:
error_message = _('Invalid ticket ID or e-mail address. Please try again.') error_message = _('Invalid ticket ID or e-mail address. Please try again.')
except ValueError:
error_message = _('Invalid ticket ID or e-mail address. Please try again.')
else: else:
if request.user.is_staff: if request.user.is_staff:
redirect_url = reverse('helpdesk:view', args=[ticket_id]) redirect_url = reverse('helpdesk:view', args=[ticket_id])