From c64a0c74e317227fd0ea2e0aab5cc371a92eb4fe Mon Sep 17 00:00:00 2001 From: Alessandro Bruni Date: Mon, 15 Oct 2018 12:11:25 +0200 Subject: [PATCH] Allow positional arguments to @login_required decorator in examples/tutorial/flaskr/auth.py --- examples/tutorial/flaskr/auth.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/examples/tutorial/flaskr/auth.py b/examples/tutorial/flaskr/auth.py index e8cd2940..6c213ad0 100644 --- a/examples/tutorial/flaskr/auth.py +++ b/examples/tutorial/flaskr/auth.py @@ -13,11 +13,11 @@ bp = Blueprint('auth', __name__, url_prefix='/auth') def login_required(view): """View decorator that redirects anonymous users to the login page.""" @functools.wraps(view) - def wrapped_view(**kwargs): + def wrapped_view(*args, **kwargs): if g.user is None: return redirect(url_for('auth.login')) - return view(**kwargs) + return view(*args, **kwargs) return wrapped_view