fix: skip ip_exists function when we force add (#4738)

This commit is contained in:
Neil Lathwood
2016-10-13 22:21:02 +01:00
committed by GitHub
parent ef5045181a
commit 56eec48db2

View File

@@ -300,7 +300,7 @@ function addHost($host, $snmp_version = '', $port = '161', $transport = 'udp', $
} else {
$ip = $host;
}
if (ip_exists($ip)) {
if ($force_add !== true && ip_exists($ip)) {
throw new HostIpExistsException("Already have host with this IP $host");
}