From 77145e2f3899c3903262cc7530dc6d1e912bef4b Mon Sep 17 00:00:00 2001 From: downtownallday Date: Mon, 15 Jun 2020 12:24:03 -0400 Subject: [PATCH] Fix server error on non-change: "ldap3.core.exceptions.LDAPChangeError: no changes in modify request" --- management/backend.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/management/backend.py b/management/backend.py index bce126d0..363fe491 100644 --- a/management/backend.py +++ b/management/backend.py @@ -203,10 +203,11 @@ class LdapConnection(ldap3.Connection): existing_record, values[attr]) if modify_op: changes[attr] = modify_op - self.wait ( self.modify(dn, changes) ) + if len(changes)>0: + self.wait ( self.modify(dn, changes) ) return 'modify' else: - # add new alias + # add new entry self.wait ( self.add(dn, objectClasses, values) ) return 'add'