mirror of
https://github.com/pkkid/python-plexapi
synced 2025-02-16 12:58:26 +00:00
Check object is instance of PlexPartialObject
for __eq__
comparison (#1182)
This commit is contained in:
parent
c8a555524e
commit
b06afb8f84
1 changed files with 3 additions and 1 deletions
|
@ -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))
|
||||
|
|
Loading…
Add table
Reference in a new issue