don't create pages with empty titles

This commit is contained in:
Frédéric Péters 2020-11-24 17:57:22 +01:00
parent 7f60bd72e8
commit d9762e6683
1 changed files with 2 additions and 0 deletions

View File

@ -58,6 +58,8 @@ class Command(BaseCommand):
'{{ properties.nom }}')
ctx = Context({'properties': feature['properties']})
page.title = Template(page_title_template).render(ctx)
if not page.title:
continue
page.parent = Page.objects.get(slug=layer.slug)
page.template_name = 'place'
page.save()