Skip to content

Commit f7f2b6b

Browse files
authored
Make sure PlexObject private attributes are set before loading data (#946)
1 parent e78835b commit f7f2b6b

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

plexapi/base.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -50,12 +50,12 @@ def __init__(self, server, data, initpath=None, parent=None):
5050
self._initpath = initpath or self.key
5151
self._parent = weakref.ref(parent) if parent is not None else None
5252
self._details_key = None
53+
self._overwriteNone = True # Allow overwriting previous attribute values with `None` when manually reloading
54+
self._autoReload = True # Automatically reload the object when accessing a missing attribute
55+
self._edits = None # Save batch edits for a single API call
5356
if data is not None:
5457
self._loadData(data)
5558
self._details_key = self._buildDetailsKey()
56-
self._overwriteNone = True
57-
self._edits = None # Save batch edits for a single API call
58-
self._autoReload = True # Automatically reload the object when accessing a missing attribute
5959

6060
def __repr__(self):
6161
uid = self._clean(self.firstAttr('_baseurl', 'key', 'id', 'playQueueID', 'uri'))

0 commit comments

Comments
 (0)