diff options
Diffstat (limited to 'django/utils')
| -rw-r--r-- | django/utils/tree.py | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/django/utils/tree.py b/django/utils/tree.py index 74612736f1..392838b482 100644 --- a/django/utils/tree.py +++ b/django/utils/tree.py @@ -64,11 +64,11 @@ class Node: return other in self.children def __eq__(self, other): - if self.__class__ != other.__class__: - return False - if (self.connector, self.negated) == (other.connector, other.negated): - return self.children == other.children - return False + return ( + self.__class__ == other.__class__ and + (self.connector, self.negated) == (other.connector, other.negated) and + self.children == other.children + ) def add(self, data, conn_type, squash=True): """ |
