Skip to content

Commit

Permalink
Update Entity.__eq__ isinstance check to work in either direction.
Browse files Browse the repository at this point in the history
(cherry picked from commit a2d62e6)
  • Loading branch information
tpapaioa authored and web-flow committed May 28, 2024
1 parent 19b2929 commit a991e35
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion nailgun/entity_mixins.py
Original file line number Diff line number Diff line change
Expand Up @@ -595,7 +595,7 @@ def __eq__(self, other):
:param other: entity to compare self to
:return: boolean indicating if entities are equal or not
"""
if not isinstance(other, type(self)):
if not isinstance(other, type(self)) and not isinstance(self, type(other)):
return False
return self.to_json_dict() == other.to_json_dict()

Expand Down

0 comments on commit a991e35

Please sign in to comment.