From ca5ad1bec0d188cee86390329e99dbe5f73a346a Mon Sep 17 00:00:00 2001 From: Josh Hawkins <32435876+hawkeye217@users.noreply.github.com> Date: Wed, 22 Oct 2025 11:47:26 -0500 Subject: [PATCH] clean up --- frigate/api/auth.py | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/frigate/api/auth.py b/frigate/api/auth.py index aee9b999d..1c1371f51 100644 --- a/frigate/api/auth.py +++ b/frigate/api/auth.py @@ -534,14 +534,9 @@ def login(request: Request, body: AppPostLoginBody): ) # Clear admin_first_time_login flag after successful admin login so the # UI stops showing the first-time login documentation link. - try: - if role == "admin": - if getattr( - request.app.frigate_config.auth, "admin_first_time_login", False - ): - request.app.frigate_config.auth.admin_first_time_login = False - except Exception: - logger.exception("Failed to clear admin_first_time_login flag on config") + if role == "admin": + request.app.frigate_config.auth.admin_first_time_login = False + return response return JSONResponse(content={"message": "Login failed"}, status_code=401)