From 0304a860373763e1282850df1297056bf443c65d Mon Sep 17 00:00:00 2001 From: Jacob Walls Date: Mon, 11 Nov 2024 20:40:41 -0500 Subject: [PATCH] nit re #11613 --- arches/app/models/models.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/arches/app/models/models.py b/arches/app/models/models.py index 594ab8ef83..3b84bca9f5 100644 --- a/arches/app/models/models.py +++ b/arches/app/models/models.py @@ -915,12 +915,15 @@ def __init__(self, *args, **kwargs): def clean(self): if not self.alias: Graph.objects.get(pk=self.graph_id).create_node_alias(self) + if not self.nodegroup_root_id: + self.nodegroup_root_id = self.nodegroup_id def save(self, **kwargs): - if not self.alias: + if not self.alias or not self.nodegroup_root_id: self.clean() add_to_update_fields(kwargs, "alias") add_to_update_fields(kwargs, "hascustomalias") + add_to_update_fields(kwargs, "nodegroup_root_id") if self.pk == self.source_identifier_id: self.source_identifier_id = None add_to_update_fields(kwargs, "source_identifier_id")