diff --git a/apis_core/apis_relations/models.py b/apis_core/apis_relations/models.py index 979785f73..99384828b 100644 --- a/apis_core/apis_relations/models.py +++ b/apis_core/apis_relations/models.py @@ -82,11 +82,12 @@ def __str__(self): return self.deprecated_name def save(self, *args, **kwargs): - if self.name_reverse != unicodedata.normalize("NFC", self.name_reverse): - self.name_reverse = unicodedata.normalize("NFC", self.name_reverse) - if self.name_reverse == "" or self.name_reverse is None: + if self.name_reverse == "": self.name_reverse = f"{self.deprecated_name} [INVERSE]" + self.deprecated_name = unicodedata.normalize("NFC", self.deprecated_name) + self.name_reverse = unicodedata.normalize("NFC", self.name_reverse) + # TODO RDF: Temporary hack, remove this once better solution is found self.name_forward = self.deprecated_name