mirror of
https://github.com/django-helpdesk/django-helpdesk.git
synced 2024-12-14 19:00:44 +01:00
BUGFIX: Capture invalid email exceptions and ignore those inputs.
This commit is contained in:
parent
4124677f10
commit
99ae4bb801
@ -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:
|
||||
|
@ -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
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user