description could be none

This commit is contained in:
j 2023-07-07 15:28:47 +05:30
parent aaa71976a6
commit bf68d370ef

View file

@ -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])