Skip to content
Snippets Groups Projects
Verified Commit ca40cd31 authored by sistason's avatar sistason
Browse files

since we only check on hasattr(request, ldap_connection), we must not

save None into that.
parent 04078ce1
No related branches found
No related tags found
No related merge requests found
...@@ -73,10 +73,12 @@ class FlaskLDAPMapper(LDAPMapper): ...@@ -73,10 +73,12 @@ class FlaskLDAPMapper(LDAPMapper):
bind_dn = session['user_dn'] bind_dn = session['user_dn']
bind_pw = session['user_pw'] bind_pw = session['user_pw']
request.ldap_connection = connect_and_bind_to_ldap(server, bind_dn, bind_pw) _connection = connect_and_bind_to_ldap(server, bind_dn, bind_pw)
if not request.ldap_connection: if not _connection:
raise LDAPBindError raise LDAPBindError
request.ldap_connection = _connection
return request.ldap_connection return request.ldap_connection
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment