From 2075f52d4c30416bcd490fb3584561c6fa321ba7 Mon Sep 17 00:00:00 2001 From: Étienne Loks Date: Fri, 29 Sep 2023 21:50:54 +0200 Subject: 🐛 areas automatically created by operation with many towns are not available by default MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ishtar_common/models.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'ishtar_common/models.py') diff --git a/ishtar_common/models.py b/ishtar_common/models.py index 9adf148b6..870dd41db 100644 --- a/ishtar_common/models.py +++ b/ishtar_common/models.py @@ -2393,10 +2393,10 @@ class Area(HierarchicalType, DocumentItem, MainItem): name.append(town._generate_cached_label()) reference.append(town.numero_insee or slugify(town.name)) name = " / ".join(name) - reference = f"{_('area')}-{'/'.join(reference)}" + reference = f"area-{'/'.join(reference)}" area, created = cls.objects.get_or_create( reference=reference, - defaults={"label": name} + defaults={"label": name, "available": False} ) area_content_type = ContentType.objects.get(app_label="ishtar_common", -- cgit v1.2.3