From 48baa97e10fa313bb5b6a4999f02326a4b0ee6b8 Mon Sep 17 00:00:00 2001 From: strajama <32276786+strajama@users.noreply.github.com> Date: Fri, 22 Feb 2019 21:43:38 +0200 Subject: [PATCH] Poistettu sulkuja MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit if not current_user.is_authenticated:ista poistettu kahdesta kohtaa sulut perästä, koska kyseessä ei ole enää funktio uudessa Flaskissa vaan boolean https://stackoverflow.com/questions/32750526/flask-login-raises-typeerror-bool-object-is-not-callable-when-trying-to-overr ja https://stackoverflow.com/questions/33062109/typeerror-bool-object-is-not-callable-g-user-is-authenticated --- source/viikko5.html.erb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/source/viikko5.html.erb b/source/viikko5.html.erb index bdae960..212868a 100644 --- a/source/viikko5.html.erb +++ b/source/viikko5.html.erb @@ -145,7 +145,7 @@ def login_required(role="ANY"): if not current_user: return login_manager.unauthorized() - if not current_user.is_authenticated(): + if not current_user.is_authenticated: return login_manager.unauthorized() unauthorized = False @@ -211,7 +211,7 @@ def login_required(role="ANY"): if not current_user: return login_manager.unauthorized() - if not current_user.is_authenticated(): + if not current_user.is_authenticated: return login_manager.unauthorized() unauthorized = False