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:
Martin Pépin 2017-03-15 19:02:31 +00:00
parent 84a39b41f2
commit e98a407982

View file

@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
import ldap3
from ldap3 import Connection
from django.shortcuts import render
from django.http import Http404
@ -76,7 +76,8 @@ def account_create(request):
if hasattr(settings, 'LDAP_SERVER_URL'):
# Fetching
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:
conn.search(