diff --git a/helpdesk/management/commands/get_email.py b/helpdesk/management/commands/get_email.py index 520ab3d5..f2e1108d 100755 --- a/helpdesk/management/commands/get_email.py +++ b/helpdesk/management/commands/get_email.py @@ -459,7 +459,7 @@ def ticket_from_message(message, queue, logger): for ccemail in new_cc: tcc = TicketCC.objects.create( ticket=t, - email=ccemail, + email=ccemail.replace('\n', ' ').replace('\r', ' '), can_view=True, can_update=False ) diff --git a/helpdesk/views/public.py b/helpdesk/views/public.py index 5d8f2207..64bbc508 100644 --- a/helpdesk/views/public.py +++ b/helpdesk/views/public.py @@ -102,6 +102,8 @@ def view_ticket(request): ticket = Ticket.objects.get(id=ticket_id, submitter_email__iexact=email) except ObjectDoesNotExist: 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: if request.user.is_staff: redirect_url = reverse('helpdesk:view', args=[ticket_id])