From 8c75b8885b027142fb01f4f9aee5cd29ee096495 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20P=C3=A9ters?= Date: Sun, 6 Jun 2021 17:21:08 +0200 Subject: [PATCH] ignore pages with layer name as slug anchored as root --- combo_plugin_gnm/management/commands/gnm_create_places.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/combo_plugin_gnm/management/commands/gnm_create_places.py b/combo_plugin_gnm/management/commands/gnm_create_places.py index c8c320d..99c023a 100644 --- a/combo_plugin_gnm/management/commands/gnm_create_places.py +++ b/combo_plugin_gnm/management/commands/gnm_create_places.py @@ -67,7 +67,7 @@ class Command(BaseCommand): page.title = Template(page_title_template).render(ctx) if not page.title: continue - page.parent = Page.objects.get(slug=layer.slug) + page.parent = Page.objects.get(slug=layer.slug, parent__isnull=False) page.template_name = 'place' page.save()