From 1ea1750f6e668108d0f6c85971d5fcf1d847e1c8 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 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()