diff options
author | Étienne Loks <etienne.loks@iggdrasil.net> | 2023-09-29 21:50:54 +0200 |
---|---|---|
committer | Étienne Loks <etienne.loks@iggdrasil.net> | 2023-09-29 22:00:34 +0200 |
commit | 2075f52d4c30416bcd490fb3584561c6fa321ba7 (patch) | |
tree | 7c20dca7e2c68829ab613068ce6b0a56f11e4c45 /ishtar_common | |
parent | ad392818e9e11708ef1e930a300aaf25672f09cb (diff) | |
download | Ishtar-2075f52d4c30416bcd490fb3584561c6fa321ba7.tar.bz2 Ishtar-2075f52d4c30416bcd490fb3584561c6fa321ba7.zip |
🐛 areas automatically created by operation with many towns are not available by default
Diffstat (limited to 'ishtar_common')
-rw-r--r-- | ishtar_common/models.py | 4 |
1 files changed, 2 insertions, 2 deletions
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", |