diff --git a/apis_core/apis_relations/models.py b/apis_core/apis_relations/models.py index 6bbc93621..08be124ee 100644 --- a/apis_core/apis_relations/models.py +++ b/apis_core/apis_relations/models.py @@ -85,6 +85,12 @@ def save(self, *args, **kwargs): self.name_reverse = unicodedata.normalize("NFC", self.name_reverse) if self.name_reverse == "" or self.name_reverse is None: self.name_reverse = self.name_forward + " [REVERSE]" + + if "update_fields" in kwargs and ( + include_fields := {"name_forward", "name_reverse"} + ).intersection(update_fields := kwargs.get("update_fields")): + kwargs["update_fields"] = set(update_fields) | include_fields + super(Property, self).save(*args, **kwargs) return self