Merge pull request #231 from YunoHost/improve_update_managment

Don't update LDAP if there are nothing to do
This commit is contained in:
Kayou 2020-02-25 17:11:56 +01:00 committed by GitHub
commit b6bfdb7ac5
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -232,6 +232,10 @@ class Authenticator(BaseAuthenticator):
actual_entry = self.search(base=dn, attrs=None)
ldif = modlist.modifyModlist(actual_entry[0], attr_dict, ignore_oldexistent=1)
if ldif == []:
logger.warning("Nothing to update in LDAP")
return True
try:
if new_rdn:
self.con.rename_s(dn, new_rdn)