From a2d62e6f4c5148d80d50044440277b8c22a556ba Mon Sep 17 00:00:00 2001 From: Tasos Papaioannou Date: Tue, 28 May 2024 13:39:20 -0400 Subject: [PATCH] Update Entity.__eq__ isinstance check to work in either direction. --- 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 07d02939..c61a3a92 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()