]> git.ipfire.org Git - ipfire.org.git/commitdiff
accounts: Fix comparison functions
authorMichael Tremer <michael.tremer@ipfire.org>
Wed, 28 Jun 2023 10:45:28 +0000 (10:45 +0000)
committerMichael Tremer <michael.tremer@ipfire.org>
Wed, 28 Jun 2023 10:45:28 +0000 (10:45 +0000)
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
src/backend/accounts.py

index a8269764039888ff10470d5dd91e7cb65fa994a9..9834c219b45329a0c1c5a7fbd26d0a9b96bc7db3 100644 (file)
@@ -43,6 +43,8 @@ class LDAPObject(Object):
                if isinstance(other, self.__class__):
                        return self.dn == other.dn
 
+               return NotImplemented
+
        @property
        def ldap(self):
                return self.accounts.ldap
@@ -1401,6 +1403,8 @@ class Group(LDAPObject):
                if isinstance(other, self.__class__):
                        return (self.description or self.gid) < (other.description or other.gid)
 
+               return NotImplemented
+
        def __bool__(self):
                return True