mirror of
https://github.com/YunoHost/moulinette.git
synced 2024-09-03 20:06:31 +02:00
Merge pull request #231 from YunoHost/improve_update_managment
Don't update LDAP if there are nothing to do
This commit is contained in:
commit
b6bfdb7ac5
1 changed files with 4 additions and 0 deletions
|
@ -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)
|
||||
|
|
Loading…
Add table
Reference in a new issue