Commit 40f21b60 authored by Sofia Papagiannaki's avatar Sofia Papagiannaki
Browse files

Revert "astakos: fix send mail error handling"

This reverts commit 903ce7dccb44db3d3e5fd280a7683747dfa37d7f.
parent 0cbc5af9
......@@ -864,19 +864,3 @@ def qh_add_pending_app(user, precursor=None, force=False, dry_run=False):
def qh_release_pending_app(user):
register_pending_apps(user, -1)
class SendMailError(Exception):
pass
class SendFeedbackError(SendMailError):
def __init__(self):
self.message = _(astakos_messages.FEEDBACK_SEND_ERR)
super(SendFeedbackError, self).__init__()
class ChangeEmailError(SendMailError):
def __init__(self):
self.message = _(astakos_messages.CHANGE_EMAIL_SEND_ERR)
super(ChangeEmailError, self).__init__()
......@@ -34,8 +34,6 @@
from django.core.management.base import BaseCommand, CommandError
from astakos.im import activation_backends
from astakos.im.functions import SendMailError
activation_backend = activation_backends.get_backend()
from ._common import get_user
......
......@@ -100,7 +100,7 @@ from astakos.im.functions import (
can_leave_request,
get_related_project_id, get_by_chain_or_404,
approve_application, deny_application,
cancel_application, dismiss_application, SendMailError)
cancel_application, dismiss_application)
from astakos.im.settings import (
COOKIE_DOMAIN, LOGOUT_NEXT,
LOGGING_LEVEL, PAGINATE_BY,
......@@ -618,13 +618,9 @@ def feedback(request, template_name='im/feedback.html', email_template_name='im/
if form.is_valid():
msg = form.cleaned_data['feedback_msg']
data = form.cleaned_data['feedback_data']
try:
send_feedback(msg, data, request.user, email_template_name)
except SendMailError, e:
messages.error(request, e)
else:
message = _(astakos_messages.FEEDBACK_SENT)
messages.success(request, message)
send_feedback(msg, data, request.user, email_template_name)
message = _(astakos_messages.FEEDBACK_SENT)
messages.success(request, message)
return HttpResponseRedirect(reverse('feedback'))
return render_response(template_name,
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment