diff --git a/arches/app/models/graph.py b/arches/app/models/graph.py index b308970458..19b0829874 100644 --- a/arches/app/models/graph.py +++ b/arches/app/models/graph.py @@ -2654,6 +2654,7 @@ def _update_source_nodegroup_hierarchy(nodegroup): setattr(source_node, key, getattr(future_node, key)) source_node.nodegroup_id = future_node.nodegroup_id + source_node.grouping_node_id = source_node.nodegroup_id if ( future_node_nodegroup_node and future_node_nodegroup_node.source_identifier_id @@ -2661,9 +2662,7 @@ def _update_source_nodegroup_hierarchy(nodegroup): source_node.nodegroup_id = ( future_node_nodegroup_node.source_identifier_id ) - source_node.grouping_node_id = ( - future_card_nodegroup_node.source_identifier_id - ) + source_node.grouping_node_id = source_node.nodegroup_id self.nodes[source_node.pk] = source_node else: # newly-created node @@ -2677,6 +2676,7 @@ def _update_source_nodegroup_hierarchy(nodegroup): future_node.nodegroup_id = ( future_node_nodegroup_node.source_identifier_id ) + future_node.grouping_node_id = future_node.nodegroup_id del editable_future_graph.nodes[future_node.pk] self.nodes[future_node.pk] = future_node