Don't use encoded bytes and its str representation as uid

(Refer redmine #7764)
This commit is contained in:
PCoder 2020-02-25 19:19:14 +05:30
parent 2cbf146ebc
commit 42fb55dee1

View file

@ -87,7 +87,7 @@ class LdapManager:
logger.debug("{uid} does not exist. Using it".format(uid=uidNumber)) logger.debug("{uid} does not exist. Using it".format(uid=uidNumber))
self._set_max_uid(uidNumber) self._set_max_uid(uidNumber)
try: try:
uid = user.encode("utf-8") uid = user
conn.add("uid={uid},{customer_dn}".format( conn.add("uid={uid},{customer_dn}".format(
uid=uid, customer_dn=settings.LDAP_CUSTOMER_DN uid=uid, customer_dn=settings.LDAP_CUSTOMER_DN
), ),