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
c3d740ade0
commit
f6d43dffa1
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
|
||||||
]
|
]
|
||||||
|
|
||||||
|
|
|
@ -96,7 +96,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