diff --git a/apis_core/apis_relations/models.py b/apis_core/apis_relations/models.py index fa1aa1a98..2f0bbb5f0 100644 --- a/apis_core/apis_relations/models.py +++ b/apis_core/apis_relations/models.py @@ -87,6 +87,12 @@ def save(self, *args, **kwargs): self.name_forward = unicodedata.normalize("NFC", str(self.name_forward)) self.name_reverse = unicodedata.normalize("NFC", str(self.name_reverse)) + if (update_fields := kwargs.get("update_fields")) is not None: + if "name_forward" in update_fields and "name_reverse" not in update_fields: + modified_update_fields = set(update_fields) + modified_update_fields.add("name_reverse") + kwargs["update_fields"] = modified_update_fields + super(Property, self).save(*args, **kwargs) return self