Skip to content

Commit

Permalink
Merge branch 'master' of github.com:wagnerrp/pytmdb3
Browse files Browse the repository at this point in the history
  • Loading branch information
wagnerrp committed Nov 16, 2014
2 parents d9fdc2e + 58ca5f2 commit 5b917e9
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
5 changes: 4 additions & 1 deletion tmdb3/pager.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,10 @@ def next(self):
self._index += 1
if self._index == self._len:
raise StopIteration
return self._parent[self._index]
try:
return self._parent[self._index]
except IndexError:
raise StopIteration


class UnpagedData(object):
Expand Down
3 changes: 1 addition & 2 deletions tmdb3/util.py
Original file line number Diff line number Diff line change
Expand Up @@ -83,8 +83,7 @@ def apply(self, data, set_nones=True):
# apply data directly, bypassing callable function
unfilled = False
for k, v in self.lookup.items():
if (k in data) and \
((data[k] is not None) if callable(self.func) else True):
if (k in data) and (not callable(self.func) or data[k] is not None):
# argument received data, populate it
setattr(self.inst, v, data[k])
elif v in self.inst._data:
Expand Down

0 comments on commit 5b917e9

Please sign in to comment.