Skip to content

Commit

Permalink
nit re #11613
Browse files Browse the repository at this point in the history
  • Loading branch information
jacobtylerwalls committed Nov 12, 2024
1 parent 581c419 commit 0304a86
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion arches/app/models/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand Down

0 comments on commit 0304a86

Please sign in to comment.