Skip to content

Commit 78f66d8

Browse files
authored
Merge pull request #84 from fredthomsen/handleEmptyResultsWithRefs
Handle empty search results w/references
2 parents eade368 + 3815496 commit 78f66d8

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

flask_simpleldap/__init__.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -185,7 +185,8 @@ def get_object_details(self, user=None, group=None, query_filter=None,
185185
ldap.SCOPE_SUBTREE, query, fields)
186186
conn.unbind_s()
187187
result = {}
188-
if records:
188+
if records and\
189+
records[0][0] is not None and isinstance(records[0][1], dict):
189190
if dn_only:
190191
if current_app.config['LDAP_OPENLDAP']:
191192
if records:

0 commit comments

Comments
 (0)