Module: check_mk
Branch: master
Commit: 8381f24255c2cd28241887289ba5e8105b29c706
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=8381f24255c2cd…
Author: Lars Michelsen <lm(a)mathias-kettner.de>
Date: Mon Feb 6 16:26:34 2017 +0100
ldap sync: Only add a pending change entry in case there were changes
Change-Id: Ia323524d5ac897832126b09a76f798ec9706c793
---
web/plugins/userdb/ldap.py | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/web/plugins/userdb/ldap.py b/web/plugins/userdb/ldap.py
index 842b886..3c95174 100644
--- a/web/plugins/userdb/ldap.py
+++ b/web/plugins/userdb/ldap.py
@@ -1021,7 +1021,8 @@ class LDAPUserConnector(UserConnector):
duration = time.time() - start_time
self.log('SYNC FINISHED - Duration: %0.3f sec' % duration)
- wato.add_change("edit-users", "\n".join(changes),
add_user=False)
+ if changes:
+ wato.add_change("edit-users", "\n".join(changes),
add_user=False)
# delete the fail flag file after successful sync
try: