diff --git a/backend/open_webui/models/auths.py b/backend/open_webui/models/auths.py index dad93dc4bd..0ea1dd412e 100644 --- a/backend/open_webui/models/auths.py +++ b/backend/open_webui/models/auths.py @@ -146,7 +146,11 @@ class AuthsTable: def authenticate_user_by_api_key( self, api_key: str, db: Optional[Session] = None ) -> Optional[UserModel]: - log.info(f"authenticate_user_by_api_key: ...{api_key[-4:]}" if api_key else "authenticate_user_by_api_key: ") + log.info( + f"authenticate_user_by_api_key: ...{api_key[-4:]}" + if api_key + else "authenticate_user_by_api_key: " + ) # if no api_key, return None if not api_key: return None