exclude empty strings from ldap results
The uid attribute in a LDAP's entry cannot be an empty string. We need to get an actual identifier.
This commit is contained in:
parent
9cdf064005
commit
a793e9a2e7
2 changed files with 2 additions and 2 deletions
|
@ -77,7 +77,7 @@ def autocomplete(request):
|
||||||
queries['clippers'] = [
|
queries['clippers'] = [
|
||||||
Clipper(entry.uid.value, entry.cn.value)
|
Clipper(entry.uid.value, entry.cn.value)
|
||||||
for entry in entries
|
for entry in entries
|
||||||
if entry.uid.value is not None
|
if entry.uid.value
|
||||||
and entry.uid.value not in usernames
|
and entry.uid.value not in usernames
|
||||||
]
|
]
|
||||||
|
|
||||||
|
|
|
@ -95,7 +95,7 @@ def account_create(request):
|
||||||
queries['clippers'] = [
|
queries['clippers'] = [
|
||||||
Clipper(entry.uid.value, entry.cn.value)
|
Clipper(entry.uid.value, entry.cn.value)
|
||||||
for entry in entries
|
for entry in entries
|
||||||
if entry.uid.value is not None
|
if entry.uid.value
|
||||||
and entry.uid.value not in usernames
|
and entry.uid.value not in usernames
|
||||||
]
|
]
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue