mirror of
https://github.com/Icinga/icingaweb2-module-businessprocess.git
synced 2026-01-16 17:52:52 -05:00
Remove node before recreating it upon edit
Else you may run into errors that objects have been defined twice.
This commit is contained in:
parent
f4a3fcc81b
commit
99a66a4b4b
1 changed files with 3 additions and 2 deletions
|
|
@ -443,6 +443,9 @@ class EditNodeForm extends QuickForm
|
|||
public function onSuccess()
|
||||
{
|
||||
$changes = ProcessChanges::construct($this->bp, $this->session);
|
||||
|
||||
$changes->deleteNode($this->node, $this->parent->getName());
|
||||
|
||||
switch ($this->getValue('node_type')) {
|
||||
case 'host':
|
||||
case 'service':
|
||||
|
|
@ -459,8 +462,6 @@ class EditNodeForm extends QuickForm
|
|||
break;
|
||||
}
|
||||
|
||||
$changes->deleteNode($this->node, $this->parent->getName());
|
||||
|
||||
// Trigger session destruction to make sure it get's stored.
|
||||
// TODO: figure out why this is necessary, might be an unclean shutdown on redirect
|
||||
unset($changes);
|
||||
|
|
|
|||
Loading…
Reference in a new issue