From 2f0bd7cf7cbce31dd06b0b9b55b2745bf3efcd51 Mon Sep 17 00:00:00 2001 From: Syrus Akbary Date: Thu, 5 Nov 2015 00:27:17 -0800 Subject: [PATCH] Revert "Improved fields hash, eq methods" This reverts commit 6a377be6658b390b23b71d0f60dfa79e1c039902. --- graphene/core/fields.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/graphene/core/fields.py b/graphene/core/fields.py index b1984db4..7cb821aa 100644 --- a/graphene/core/fields.py +++ b/graphene/core/fields.py @@ -184,7 +184,8 @@ class Field(object): def __eq__(self, other): # Needed for @total_ordering if isinstance(other, Field): - return self.creation_counter == other.creation_counter + return self.creation_counter == other.creation_counter and \ + self.object_type == other.object_type return NotImplemented def __lt__(self, other): @@ -194,7 +195,7 @@ class Field(object): return NotImplemented def __hash__(self): - return hash((self.creation_counter)) + return hash((self.creation_counter, self.object_type)) def __copy__(self): # We need to avoid hitting __reduce__, so define this