diff --git a/app/auth/views.py b/app/auth/views.py index 2043d4ae..7e963e36 100644 --- a/app/auth/views.py +++ b/app/auth/views.py @@ -9,6 +9,8 @@ from ..models import User @auth.route('/login', methods=['GET', 'POST']) def login(): + if current_user.is_authenticated: + return redirect(url_for('main.index')) form = LoginForm() if form.validate_on_submit(): user = User.query.filter_by(email=form.login.data).first()