Skip to content

Commit

Permalink
Prevent data from being blanked out by subsequent queries.
Browse files Browse the repository at this point in the history
  • Loading branch information
wagnerrp committed Jul 2, 2012
1 parent 6e7725d commit 0c4df45
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 1 deletion.
2 changes: 1 addition & 1 deletion setup.py
Expand Up @@ -4,7 +4,7 @@

setup(
name='tmdb3',
version='0.6.4',
version='0.6.5',
description='TheMovieDB.org APIv3 interface',
long_description="Object-oriented interface to TheMovieDB.org's v3 API.",
packages=['tmdb3']
Expand Down
1 change: 1 addition & 0 deletions tmdb3/tmdb_api.py
Expand Up @@ -47,6 +47,7 @@
# 0.6.2 Add similar movie search for Movie objects
# 0.6.3 Add Studio search
# 0.6.4 Add Genre list and associated Movie search
# 0.6.5 Prevent data from being blanked out by subsequent queries

from request import set_key, Request
from util import Datapoint, Datalist, Datadict, Element, NameRepr, SearchRepr
Expand Down
4 changes: 4 additions & 0 deletions tmdb3/util.py
Expand Up @@ -84,6 +84,10 @@ def apply(self, data, set_nones=True):
((data[k] is not None) if callable(self.func) else True):
# argument received data, populate it
setattr(self.inst, v, data[k])
elif v in self.inst._data:
# argument did not receive data, but Element already contains
# some value, so skip this
continue
elif set_nones:
# argument did not receive data, so fill it with None
# to indicate such and prevent a repeat scan
Expand Down

0 comments on commit 0c4df45

Please sign in to comment.