From 0dd6b1132e9511b5c388ef28f04d7dcf899b1438 Mon Sep 17 00:00:00 2001 From: j Date: Wed, 7 Sep 2016 15:05:32 +0200 Subject: [PATCH] more py3 --- oxdata/lookup/models.py | 2 +- oxdata/movie/models.py | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/oxdata/lookup/models.py b/oxdata/lookup/models.py index ff539b2..461d481 100644 --- a/oxdata/lookup/models.py +++ b/oxdata/lookup/models.py @@ -22,7 +22,7 @@ def oxdb_sortnames(names): try: sort_names = oxdb_api.sortName(names=names)['data'].values() except: - sort_names = map(canonical_name, names) + sort_names = list(map(canonical_name, names)) return sort_names def get_movie_id(imdb_id): diff --git a/oxdata/movie/models.py b/oxdata/movie/models.py index c08452b..b7263fc 100644 --- a/oxdata/movie/models.py +++ b/oxdata/movie/models.py @@ -122,9 +122,9 @@ class Imdb(models.Model): if isinstance(value, string_types): value = normalize_value(value) setattr(self, key, value) - if self.season < 0: + if self.season and self.season < 0: self.season = None - if self.episode < 0: + if self.episode and self.episode < 0: self.episode = None self.save() elif not self.invalid: