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
…1157)

(cherry picked from commit a2d62e6)

Co-authored-by: Tasos Papaioannou <[email protected]>
  • Loading branch information
Satellite-QE and tpapaioa authored May 28, 2024
1 parent ec59833 commit acf10cd
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 @@ -594,7 +594,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 acf10cd

Please sign in to comment.