summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--doc-publik/update-publik-doc-from-mallard.py7
1 files changed, 4 insertions, 3 deletions
diff --git a/doc-publik/update-publik-doc-from-mallard.py b/doc-publik/update-publik-doc-from-mallard.py
index 1ddfac8..2d9eff4 100644
--- a/doc-publik/update-publik-doc-from-mallard.py
+++ b/doc-publik/update-publik-doc-from-mallard.py
@@ -32,6 +32,7 @@ for cell in TextCell.objects.filter(slug__startswith='mallard-'):
for img in document.find_all('img'):
img.attrs['src'] = 'https://doc.entrouvert.org/%s/dev/%s' % (module, img.attrs['src'])
- new_content = unicode(content).replace(unicode(more_info), '')
- cell.text = new_content
- cell.save()
+ if more_info:
+ new_content = content.decode().replace(more_info.decode(), '')
+ cell.text = new_content
+ cell.save()