diff --git a/helpdesk/forms.py b/helpdesk/forms.py index d54f76a9..ee504dff 100644 --- a/helpdesk/forms.py +++ b/helpdesk/forms.py @@ -562,7 +562,7 @@ class TicketCCForm(forms.ModelForm): email = cleaned_data.get('email', '') if user is None and len(email) == 0: - raise forms.ValidationError(_('When you add somebody on Cc, you must provided either an User or a valid email.')) + raise forms.ValidationError(_('When you add somebody on Cc, you must provided either an User or a valid email. Email: %s' %email)) class TicketDependencyForm(forms.ModelForm): class Meta: diff --git a/helpdesk/management/commands/get_email.py b/helpdesk/management/commands/get_email.py index 96cef195..9f21f27c 100644 --- a/helpdesk/management/commands/get_email.py +++ b/helpdesk/management/commands/get_email.py @@ -24,6 +24,7 @@ from optparse import make_option from email_reply_parser import EmailReplyParser +from django.core.exceptions import ValidationError from django.core.files.base import ContentFile from django.core.management.base import BaseCommand from django.db.models import Q @@ -183,8 +184,11 @@ def create_ticket_cc(ticket, cc_list): except User.DoesNotExist: pass - ticket_cc = subscribe_to_ticket_updates(ticket=ticket, user=user, email=cced_email) - new_ticket_ccs.append(ticket_cc) + try: + ticket_cc = subscribe_to_ticket_updates(ticket=ticket, user=user, email=cced_email) + new_ticket_ccs.append(ticket_cc) + except ValidationError, err: + pass return new_ticket_ccs