diff --git a/CTFd/utils/initialization/__init__.py b/CTFd/utils/initialization/__init__.py index 7304584..b92af1e 100644 --- a/CTFd/utils/initialization/__init__.py +++ b/CTFd/utils/initialization/__init__.py @@ -202,7 +202,8 @@ def init_request_processors(app): except (InvalidRequestError, IntegrityError): db.session.rollback() logout_user() - clear_user_recent_ips(user_id=session["id"]) + else: + clear_user_recent_ips(user_id=session["id"]) @app.before_request def banned():