Skip to content

Commit 697df1a

Browse files
committed
allow empty lists to be autoreloaded
1 parent e70792e commit 697df1a

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

VERSION

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
1.0.6
1+
1.0.7

tmdbapis/objs/base.py

+3-1
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,9 @@ def __eq__(self, other):
5757

5858
def __getattribute__(self, item):
5959
value = super().__getattribute__(item)
60-
if item.startswith("_") or self._loading or not self._partial or value is not None:
60+
if item.startswith("_") or self._loading or not self._partial or \
61+
(isinstance(value, (list, dict, int, float)) and value) or \
62+
(not isinstance(value, (list, dict, int, float)) and value is not None):
6163
return value
6264
self._load(None)
6365
return super().__getattribute__(item)

0 commit comments

Comments
 (0)