description could be none
This commit is contained in:
parent
aaa71976a6
commit
bf68d370ef
1 changed files with 2 additions and 0 deletions
|
@ -218,6 +218,8 @@ class Imdb(models.Model):
|
||||||
for c in data['connections'][type]:
|
for c in data['connections'][type]:
|
||||||
for key in ('title', 'description'):
|
for key in ('title', 'description'):
|
||||||
if key in c:
|
if key in c:
|
||||||
|
if c[key] is None:
|
||||||
|
del c[key]
|
||||||
c[key] = ox.sanitize_html(fix_links(c[key]))
|
c[key] = ox.sanitize_html(fix_links(c[key]))
|
||||||
if key == 'description':
|
if key == 'description':
|
||||||
c[key] = fix_links(c[key])
|
c[key] = fix_links(c[key])
|
||||||
|
|
Loading…
Reference in a new issue