Skip to content

Commit

Permalink
should close #61 for good now
Browse files Browse the repository at this point in the history
  • Loading branch information
csae8092 committed Jan 20, 2024
1 parent 0383312 commit 2fb4e43
Showing 1 changed file with 1 addition and 15 deletions.
16 changes: 1 addition & 15 deletions apis_core/apis_vocabularies/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down

0 comments on commit 2fb4e43

Please sign in to comment.