X-Git-Url: https://git.mdrn.pl/wolnelektury.git/blobdiff_plain/0213808c52019edebba66cd0163867a441f8a4a0..515610278a618c78e49ddd5410cb6a8952841685:/src/chunks/models.py?ds=inline diff --git a/src/chunks/models.py b/src/chunks/models.py index fc03c1be0..7bca1e2dd 100644 --- a/src/chunks/models.py +++ b/src/chunks/models.py @@ -69,9 +69,13 @@ class MenuItem(models.Model): class Meta: ordering = ('order',) + @property + def is_separator(self): + return self.name == '-' + @property def final_name(self): - if self.name == '-': + if self.is_separator: return mark_safe('
') if self.name: return self.name