Rename bits -> search_words in kfet.autocomplete
This is typo, this variable has not the same name in `gestioncof.autocomplete` and `kfet.autocomplete`
This commit is contained in:
parent
84a39b41f2
commit
e98a407982
|
@ -1,6 +1,6 @@
|
||||||
# -*- coding: utf-8 -*-
|
# -*- coding: utf-8 -*-
|
||||||
|
|
||||||
import ldap3
|
from ldap3 import Connection
|
||||||
|
|
||||||
from django.shortcuts import render
|
from django.shortcuts import render
|
||||||
from django.http import Http404
|
from django.http import Http404
|
||||||
|
@ -76,7 +76,8 @@ def account_create(request):
|
||||||
if hasattr(settings, 'LDAP_SERVER_URL'):
|
if hasattr(settings, 'LDAP_SERVER_URL'):
|
||||||
# Fetching
|
# Fetching
|
||||||
ldap_query = '(|{:s})'.format(''.join(
|
ldap_query = '(|{:s})'.format(''.join(
|
||||||
['(cn=*{bit:s}*)(uid=*{bit:s}*)'.format(**{"bit": bit}) for bit in bits]
|
['(cn=*{bit:s}*)(uid=*{bit:s}*)'.format(bit=word)
|
||||||
|
for word in search_words]
|
||||||
))
|
))
|
||||||
with Connection(settings.LDAP_SERVER_URL) as conn:
|
with Connection(settings.LDAP_SERVER_URL) as conn:
|
||||||
conn.search(
|
conn.search(
|
||||||
|
|
Loading…
Reference in a new issue