From: Michael Tremer Date: Wed, 28 Jun 2023 10:45:28 +0000 (+0000) Subject: accounts: Fix comparison functions X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=03e6aafb83a9b187e908610fe0cf468063d9dd58;p=ipfire.org.git accounts: Fix comparison functions Signed-off-by: Michael Tremer --- diff --git a/src/backend/accounts.py b/src/backend/accounts.py index a8269764..9834c219 100644 --- a/src/backend/accounts.py +++ b/src/backend/accounts.py @@ -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