Correct mail settings validation

This commit is contained in:
Raphael Michel
2016-06-21 11:40:31 +02:00
parent 75b59e9d33
commit ebec8c8595

View File

@@ -339,6 +339,9 @@ class MailSettingsForm(SettingsForm):
# Python's smtplib does not support password-less schemes anyway.
data['smtp_password'] = self.initial.get('smtp_password')
if data.get('smtp_use_tls') and data.get('smtp_use_ssl'):
raise ValidationError(_('You can activate either SSL or STARTTLS security, but not both at the same time.'))
class TicketSettingsForm(SettingsForm):
ticket_download = forms.BooleanField(