mirror of
https://github.com/Icinga/icingaweb2-module-director.git
synced 2025-07-29 08:44:11 +02:00
Clone..Form: fix for ImportSource and SyncRule
This commit is contained in:
parent
62a16bd259
commit
f3b972e904
@ -51,6 +51,7 @@ class CloneImportSourceForm extends Form
|
||||
$export = $this->source->export();
|
||||
$newName = $this->getValue('source_name');
|
||||
$export->source_name = $newName;
|
||||
unset($export->originalId);
|
||||
|
||||
if (ImportSource::existsWithName($newName, $this->source->getConnection())) {
|
||||
$this->getElement('source_name')->addMessage('Name already exists');
|
||||
|
@ -52,6 +52,8 @@ class CloneSyncRuleForm extends Form
|
||||
$export = $this->rule->export();
|
||||
$newName = $this->getValue('rule_name');
|
||||
$export->rule_name = $newName;
|
||||
unset($export->originalId);
|
||||
|
||||
if (SyncRule::existsWithName($newName, $this->getTargetDb())) {
|
||||
$this->getElement('rule_name')->addMessage('Name already exists');
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user