AddNodeForm: do not store a parent in case...

...there is no such

fixes #83
This commit is contained in:
Thomas Gelf 2017-01-23 23:45:52 +01:00
parent 39ddd47b20
commit dae799fd1e

View file

@ -383,7 +383,9 @@ class AddNodeForm extends QuickForm
case 'new-process':
$properties = $this->getValues();
unset($properties['name']);
$properties['parentName'] = $this->parent->getName();
if ($this->hasParentNode()) {
$properties['parentName'] = $this->parent->getName();
}
$changes->createNode($this->getValue('name'), $properties);
break;
}