Merge pull request #586 from aesdev/master

Fix for Email Issue while pulling CC and ValueError for public homepage
This commit is contained in:
Garret Wassermann 2018-01-12 13:55:01 -05:00 committed by GitHub
commit 2852e7ba28
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 1 deletions

View File

@ -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
)

View File

@ -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])