Changeset - 4b2de5372260
[Not reviewed]
default
0 1 0
Dennis Fink - 10 years ago 2015-02-16 02:31:36
dennis.fink@c3l.lu
Announce to the user if the application form could not be sended!
1 file changed with 2 insertions and 1 deletions:
0 comments (0 inline, 0 general)
ennstatus/root/functions.py
Show inline comments
 
@@ -14,22 +14,23 @@ def send_membership_mail(form):
 
                                   username=form.username.data,
 
                                   email=form.email.data,
 
                                   membership=form.membership.data,
 
                                   c3l=form.c3l.data,
 
                                   firstname=form.firstname.data,
 
                                   surname=form.surname.data,
 
                                   street=form.street.data,
 
                                   zip=form.zip.data,
 
                                   city=form.city.data,
 
                                   country=form.country.data,
 
                                   gpg=form.gpg.data
 
                                   )
 
        print(msg.body)
 
        mail.send(msg)
 
        flash('Application successfully sended!', 'success')
 
    except KeyError:
 
        flash('Internal server error! Please get in touch with us at info@enn.lu!', 'error')
 
        current_app.logger.error('Membership admin not found!')
 
    except AssertionError:
 
        pass
 
    except Exception as e:
 
        flash('Internal server error! Please get in touch with us at info@enn.lu!', 'error')
 
        current_app.logger.error('Unexpecter error: %s' % e,
 
                                 exc_info=True)
0 comments (0 inline, 0 general)