|
@@ -22,9 +22,10 @@ class NodeAdd(object):
|
|
|
if check_if_last:
|
|
|
if commons.is_type_mandatory(node_type):
|
|
|
print("Type {} became mandatory, adding it to instance models ...".format(node_type))
|
|
|
- # local add made type mandatory, so need to add to instance models
|
|
|
+ # local add made type mandatory, so need to add to instance models (if not exists already)
|
|
|
for im in commons.all_instance_models():
|
|
|
- self.execute(im, node_type, local=True, check_if_last=False)
|
|
|
+ if not commons.all_nodes_with_type(im, self._node_type):
|
|
|
+ self.execute(im, node_type, local=True, check_if_last=False)
|
|
|
|
|
|
else:
|
|
|
for m in commons.all_models():
|