diff --git a/library/Director/Web/Form/CloneSyncRuleForm.php b/library/Director/Web/Form/CloneSyncRuleForm.php index 5b20ce24..4b3865e0 100644 --- a/library/Director/Web/Form/CloneSyncRuleForm.php +++ b/library/Director/Web/Form/CloneSyncRuleForm.php @@ -52,7 +52,7 @@ class CloneSyncRuleForm extends Form $export = $this->rule->export(); $newName = $this->getValue('rule_name'); $export->rule_name = $newName; - if (SyncRule::existsWithName($newName, $this->rule->getConnection())) { + if (SyncRule::existsWithName($newName, $this->getTargetDb())) { $this->getElement('rule_name')->addMessage('Name already exists'); } $this->newRule = SyncRule::import($export, $this->getTargetDb());