From de3cb402db81152aeff0ee6b5d2676292e63656a Mon Sep 17 00:00:00 2001 From: Satellite QE <115476073+Satellite-QE@users.noreply.github.com> Date: Tue, 28 May 2024 15:37:14 -0400 Subject: [PATCH] Update Entity.__eq__ isinstance check to work in either direction. (#1159) (cherry picked from commit a2d62e6f4c5148d80d50044440277b8c22a556ba) Co-authored-by: Tasos Papaioannou --- nailgun/entity_mixins.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nailgun/entity_mixins.py b/nailgun/entity_mixins.py index 398ea75a..e83864cb 100644 --- a/nailgun/entity_mixins.py +++ b/nailgun/entity_mixins.py @@ -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()