more py3
This commit is contained in:
parent
8dbe22b6ea
commit
0dd6b1132e
2 changed files with 3 additions and 3 deletions
|
@ -22,7 +22,7 @@ def oxdb_sortnames(names):
|
||||||
try:
|
try:
|
||||||
sort_names = oxdb_api.sortName(names=names)['data'].values()
|
sort_names = oxdb_api.sortName(names=names)['data'].values()
|
||||||
except:
|
except:
|
||||||
sort_names = map(canonical_name, names)
|
sort_names = list(map(canonical_name, names))
|
||||||
return sort_names
|
return sort_names
|
||||||
|
|
||||||
def get_movie_id(imdb_id):
|
def get_movie_id(imdb_id):
|
||||||
|
|
|
@ -122,9 +122,9 @@ class Imdb(models.Model):
|
||||||
if isinstance(value, string_types):
|
if isinstance(value, string_types):
|
||||||
value = normalize_value(value)
|
value = normalize_value(value)
|
||||||
setattr(self, key, value)
|
setattr(self, key, value)
|
||||||
if self.season < 0:
|
if self.season and self.season < 0:
|
||||||
self.season = None
|
self.season = None
|
||||||
if self.episode < 0:
|
if self.episode and self.episode < 0:
|
||||||
self.episode = None
|
self.episode = None
|
||||||
self.save()
|
self.save()
|
||||||
elif not self.invalid:
|
elif not self.invalid:
|
||||||
|
|
Loading…
Reference in a new issue