From d291ca0071b2e73dc0750bedced1257c37d73032 Mon Sep 17 00:00:00 2001 From: Matthias Date: Sun, 10 May 2020 19:43:16 +0200 Subject: [PATCH] Simplify code section --- freqtrade/rpc/api_server.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/freqtrade/rpc/api_server.py b/freqtrade/rpc/api_server.py index 21f28f601..68f4b1ca9 100644 --- a/freqtrade/rpc/api_server.py +++ b/freqtrade/rpc/api_server.py @@ -45,8 +45,7 @@ def require_login(func: Callable[[Any, Any], Any]): def func_wrapper(obj, *args, **kwargs): verify_jwt_in_request_optional() auth = request.authorization - i = get_jwt_identity() - if i or auth and obj.check_auth(auth.username, auth.password): + if get_jwt_identity() or auth and obj.check_auth(auth.username, auth.password): return func(obj, *args, **kwargs) else: return jsonify({"error": "Unauthorized"}), 401