Skip to content

Commit 2f0bd7c

Browse files
committed
Revert "Improved fields hash, eq methods"
This reverts commit 6a377be.
1 parent 842d115 commit 2f0bd7c

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

graphene/core/fields.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -184,7 +184,8 @@ def __repr__(self):
184184
def __eq__(self, other):
185185
# Needed for @total_ordering
186186
if isinstance(other, Field):
187-
return self.creation_counter == other.creation_counter
187+
return self.creation_counter == other.creation_counter and \
188+
self.object_type == other.object_type
188189
return NotImplemented
189190

190191
def __lt__(self, other):
@@ -194,7 +195,7 @@ def __lt__(self, other):
194195
return NotImplemented
195196

196197
def __hash__(self):
197-
return hash((self.creation_counter))
198+
return hash((self.creation_counter, self.object_type))
198199

199200
def __copy__(self):
200201
# We need to avoid hitting __reduce__, so define this

0 commit comments

Comments
 (0)