diff --git a/oxdata/movie/models.py b/oxdata/movie/models.py index 2a084be..8ab345f 100644 --- a/oxdata/movie/models.py +++ b/oxdata/movie/models.py @@ -108,7 +108,7 @@ class Imdb(models.Model): return data def update(self, timeout=None): - if timeout != None: + if timeout is not None: info = ox.web.imdb.ImdbCombined(self.imdb, timeout=timeout) else: info = ox.web.imdb.ImdbCombined(self.imdb) @@ -122,6 +122,8 @@ class Imdb(models.Model): if isinstance(value, str): value = normalize_value(value) setattr(self, key, value) + else: + setattr(self, key, '') if self.season and self.season < 0: self.season = None if self.episode and self.episode < 0: