mirror of
https://github.com/pkkid/python-plexapi
synced 2024-11-22 11:43:13 +00:00
Check obj is not None for _isChildOf
This commit is contained in:
parent
a7f5d16aee
commit
04a07b3e7d
1 changed files with 2 additions and 2 deletions
|
@ -119,9 +119,9 @@ class PlexObject(object):
|
|||
See all possible `**kwargs*` in :func:`~plexapi.base.PlexObject.fetchItem`.
|
||||
"""
|
||||
obj = self
|
||||
while obj._parent is not None and obj._parent() is not None:
|
||||
while obj and obj._parent is not None:
|
||||
obj = obj._parent()
|
||||
if obj._checkAttrs(obj._data, **kwargs):
|
||||
if obj and obj._checkAttrs(obj._data, **kwargs):
|
||||
return True
|
||||
return False
|
||||
|
||||
|
|
Loading…
Reference in a new issue