From c778a6c4d96c4fcc068deba29099546816fd80c5 Mon Sep 17 00:00:00 2001 From: Erik Stein Date: Sat, 13 Oct 2018 16:02:49 +0200 Subject: [PATCH] SlugTreeMixin: Check `parent` and `has_url` fields, too. --- CHANGES | 3 ++- shared/utils/models/slugs.py | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/CHANGES b/CHANGES index c3ee13e..185ae8f 100644 --- a/CHANGES +++ b/CHANGES @@ -1,6 +1,7 @@ 0.2.13 2018-10-13 - Improved USE_TRANSLATABLE_FIELDS -- Option to allow empty runtimes (without even a start date). +- Option to allow empty runtimes (without even a start date) +- SlugTreeMixin: Check `has_url` and `parent` fields, too 0.2.12 2018-09-28 - Additional text template tags. diff --git a/shared/utils/models/slugs.py b/shared/utils/models/slugs.py index 22464b0..da7ebf9 100644 --- a/shared/utils/models/slugs.py +++ b/shared/utils/models/slugs.py @@ -132,7 +132,7 @@ class SlugTreeMixin(DirtyFieldsMixin, models.Model): # TODO Make slug_path manually overridable (see feincms3 -> use_static_path) has_url = models.BooleanField(_("has webaddress"), default=True) - FIELDS_TO_CHECK = ['slug'] + FIELDS_TO_CHECK = ['slug', 'parent', 'has_url'] class Meta: abstract = True