mirror of
https://github.com/Icinga/icingaweb2-module-businessprocess.git
synced 2025-12-20 14:50:11 -05:00
BpConfigForm: Don't override processes which have coincidentally the same name
fixes #195
This commit is contained in:
parent
20b957a999
commit
67613930a2
1 changed files with 8 additions and 0 deletions
|
|
@ -133,6 +133,14 @@ class BpConfigForm extends BpConfigBaseForm
|
|||
$name = $this->getValue('name');
|
||||
|
||||
if ($this->config === null) {
|
||||
if ($this->storage->hasProcess($name)) {
|
||||
$this->addError(sprintf(
|
||||
$this->translate('A process named "%s" already exists'),
|
||||
$name
|
||||
));
|
||||
return;
|
||||
}
|
||||
|
||||
// New config
|
||||
$config = new BpConfig();
|
||||
$config->setName($name);
|
||||
|
|
|
|||
Loading…
Reference in a new issue