Check object is instance of PlexPartialObject for __eq__ comparison (#1182)

This commit is contained in:
JonnyWong16 2023-07-27 14:40:14 -07:00 committed by GitHub
parent c8a555524e
commit b06afb8f84
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -489,7 +489,9 @@ class PlexPartialObject(PlexObject):
}
def __eq__(self, other):
return other not in [None, []] and self.key == other.key
if isinstance(other, PlexPartialObject):
return other not in [None, []] and self.key == other.key
return NotImplemented
def __hash__(self):
return hash(repr(self))