Skip to content

Commit

Permalink
allow empty lists to be autoreloaded
Browse files Browse the repository at this point in the history
  • Loading branch information
meisnate12 committed Oct 19, 2022
1 parent e70792e commit 697df1a
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
1.0.6
1.0.7
4 changes: 3 additions & 1 deletion tmdbapis/objs/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,9 @@ def __eq__(self, other):

def __getattribute__(self, item):
value = super().__getattribute__(item)
if item.startswith("_") or self._loading or not self._partial or value is not None:
if item.startswith("_") or self._loading or not self._partial or \
(isinstance(value, (list, dict, int, float)) and value) or \
(not isinstance(value, (list, dict, int, float)) and value is not None):
return value
self._load(None)
return super().__getattribute__(item)
Expand Down

0 comments on commit 697df1a

Please sign in to comment.