From bccd5679cd4af6ec69e88cb8fe6fde5464a6c03a Mon Sep 17 00:00:00 2001 From: David Carmichael Date: Wed, 20 Sep 2023 15:24:20 +0100 Subject: [PATCH] Adjusted logout route used in testing --- app/blueprints/tests/routes/security.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/blueprints/tests/routes/security.py b/app/blueprints/tests/routes/security.py index 10fb3f85..eafea9b8 100644 --- a/app/blueprints/tests/routes/security.py +++ b/app/blueprints/tests/routes/security.py @@ -24,7 +24,8 @@ def login_int(): @bp.route("/logout", methods=["GET"]) def logout(): - del session["logged_in"] + if session.get("logged_in"): + del session["logged_in"] return render_template(bp.tmpl("security.html"), logged_in=False)