reset values
This commit is contained in:
parent
d5902e2437
commit
ef075ffb78
1 changed files with 3 additions and 1 deletions
|
@ -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:
|
||||
|
|
Loading…
Reference in a new issue