doc: ignore page snapshots when looking for textcell

This commit is contained in:
Frédéric Péters 2019-01-07 15:28:02 +01:00
parent 2c7c3b798a
commit 5916e4a986
1 changed files with 2 additions and 1 deletions

View File

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