From 2fb4e43da227b19bd8cb07242b94fca772949139 Mon Sep 17 00:00:00 2001 From: csae8092 Date: Sat, 20 Jan 2024 10:52:26 +0100 Subject: [PATCH] should close #61 for good now --- apis_core/apis_vocabularies/models.py | 16 +--------------- 1 file changed, 1 insertion(+), 15 deletions(-) diff --git a/apis_core/apis_vocabularies/models.py b/apis_core/apis_vocabularies/models.py index 7f73996..e193be5 100644 --- a/apis_core/apis_vocabularies/models.py +++ b/apis_core/apis_vocabularies/models.py @@ -84,21 +84,7 @@ def __str__(self): @cached_property def label_reverse(self): - d = self - if len(self.name_reverse) < 1: - res = "(" + self.name + ")" - else: - res = self.name_reverse - while d.parent_class: - try: - t = RelationBaseClass.objects.get(pk=d.parent_class.pk).name_reverse - if len(t) < 1: - t = "(" + d.parent_class.name + ")" - except Exception as e: - t = "(" + d.parent_class.name + ")" - res = t + " >> " + res - d = d.parent_class - return res + return f"{self.name_reverse}" def save(self, *args, **kwargs): if self.name_reverse != unicodedata.normalize("NFC", self.name_reverse):