From a796e29c98359453c1cf7fb0b92bc278c1518f2e Mon Sep 17 00:00:00 2001 From: Jeremy Stretch Date: Fri, 9 Oct 2020 13:16:07 -0400 Subject: [PATCH] Fixes #5229: Fix AttributeError exception when LDAP authentication is enabled --- docs/release-notes/version-2.9.md | 8 ++++++++ netbox/netbox/authentication.py | 2 +- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/docs/release-notes/version-2.9.md b/docs/release-notes/version-2.9.md index 419895365..d140534f1 100644 --- a/docs/release-notes/version-2.9.md +++ b/docs/release-notes/version-2.9.md @@ -1,5 +1,13 @@ # NetBox v2.9 +## v2.9.6 (FUTURE) + +### Bug Fixes + +* [#5229](https://github.com/netbox-community/netbox/issues/5229) - Fix AttributeError exception when LDAP authentication is enabled + +--- + ## v2.9.5 (2020-10-09) ### Enhancements diff --git a/netbox/netbox/authentication.py b/netbox/netbox/authentication.py index cd608bec5..6328c40d7 100644 --- a/netbox/netbox/authentication.py +++ b/netbox/netbox/authentication.py @@ -175,6 +175,6 @@ class LDAPBackend: # Enable logging for django_auth_ldap ldap_logger = logging.getLogger('django_auth_ldap') ldap_logger.addHandler(logging.StreamHandler()) - ldap_logger.setLevel(logging.INFO if settings.DEBUG is False else logging.DEBUG) + ldap_logger.setLevel(logging.INFO) return obj