nickw444 / flask-ldap3-login

LDAP3 Logins for Flask/Flask-Login
http://flask-ldap3-login.readthedocs.org/en/latest/
MIT License
73 stars 38 forks source link

Adding None check on teardown #114

Open andrewjroth opened 1 year ago

andrewjroth commented 1 year ago

It is possible for the attribute "ldap3_manager_main_connection" might exist in the context, but the value to be None. In particular, this can happen during unit tests while using mock functionality. This check prevents attempting to unbind a None value.