From a8b1861fc4d0a48b4879af803bba094eef145017 Mon Sep 17 00:00:00 2001 From: Anssi Kääriäinen Date: Wed, 3 Oct 2012 18:21:39 +0300 Subject: Revert "Fixed #16211 -- Added comparison and negation ops to F() expressions" This reverts commit 28abf5f0ebc9d380f25dd278d7ef4642c4504545. Conflicts: docs/releases/1.5.txt --- django/utils/tree.py | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) (limited to 'django/utils') diff --git a/django/utils/tree.py b/django/utils/tree.py index 6229493544..717181d2b9 100644 --- a/django/utils/tree.py +++ b/django/utils/tree.py @@ -88,12 +88,8 @@ class Node(object): Otherwise, the whole tree is pushed down one level and a new root connector is created, connecting the existing tree and the new node. """ - # Using for loop with 'is' instead of 'if node in children' so node - # __eq__ method doesn't get called. The __eq__ method can be overriden - # by subtypes, for example the F-expression. - for child in self.children: - if node is child and conn_type == self.connector: - return + if node in self.children and conn_type == self.connector: + return if len(self.children) < 2: self.connector = conn_type if self.connector == conn_type: -- cgit v1.3