From 8b61db8dee1902ae116954bf505ae5da7156aef2 Mon Sep 17 00:00:00 2001 From: PCoder Date: Sun, 17 Feb 2019 17:57:48 +0100 Subject: [PATCH] Simplify getting LDAP_USE_TLS --- dal/settings.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/dal/settings.py b/dal/settings.py index 7c30a2a..ee96962 100644 --- a/dal/settings.py +++ b/dal/settings.py @@ -28,8 +28,7 @@ search_base = os.environ['LDAPSEARCH'].split() search_base_ldap = [ LDAPSearch(x, ldap.SCOPE_SUBTREE, "(uid=%(user)s)") for x in search_base ] AUTH_LDAP_USER_SEARCH = LDAPSearchUnion(*search_base_ldap) -if os.environ['LDAP_USE_TLS']: - AUTH_LDAP_START_TLS=True +AUTH_LDAP_START_TLS = os.environ.get('LDAP_USE_TLS', False) BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))