From bf68d370efd1c1106d91814e000d25e905768e47 Mon Sep 17 00:00:00 2001 From: j Date: Fri, 7 Jul 2023 15:28:47 +0530 Subject: [PATCH] description could be none --- oxdata/movie/models.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/oxdata/movie/models.py b/oxdata/movie/models.py index 67da419..4ee1259 100644 --- a/oxdata/movie/models.py +++ b/oxdata/movie/models.py @@ -218,6 +218,8 @@ class Imdb(models.Model): for c in data['connections'][type]: for key in ('title', 'description'): if key in c: + if c[key] is None: + del c[key] c[key] = ox.sanitize_html(fix_links(c[key])) if key == 'description': c[key] = fix_links(c[key])