From 5916e4a9862ac53947dc8412e2301a89ca9b6d05 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20P=C3=A9ters?= Date: Mon, 7 Jan 2019 15:28:02 +0100 Subject: [PATCH] doc: ignore page snapshots when looking for textcell --- doc-publik/update-publik-doc-from-mallard.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/doc-publik/update-publik-doc-from-mallard.py b/doc-publik/update-publik-doc-from-mallard.py index 2bfc08e..e0990cc 100644 --- a/doc-publik/update-publik-doc-from-mallard.py +++ b/doc-publik/update-publik-doc-from-mallard.py @@ -24,7 +24,8 @@ for cell in TextCell.objects.filter(slug__startswith='mallard-'): if '/' in parsed.path: continue try: - target_cell = TextCell.objects.get(slug='mallard-%s' % parsed.path.replace('.html', '')) + target_cell = TextCell.objects.get(slug='mallard-%s' % parsed.path.replace('.html', ''), + page__snapshot__isnull=True) except TextCell.DoesNotExist: continue a.attrs['href'] = target_cell.page.get_online_url()