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

(cherry picked from commit a2d62e6)

Co-authored-by: Tasos Papaioannou <tpapaioa@redhat.com>
  • Loading branch information
Satellite-QE and tpapaioa authored May 28, 2024
1 parent d997df9 commit de3cb40
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 de3cb40

Please sign in to comment.