Fix dev:simulate (#12596)

This commit is contained in:
Tony Murray
2021-03-08 18:33:42 -06:00
committed by GitHub
parent 74c3d714a5
commit 9e10b757fa

View File

@@ -80,7 +80,7 @@ class DevSimulate extends LnmsCommand
private function addDevice($community) private function addDevice($community)
{ {
$hostname = $this->option('new') ? $community : 'snmpsim'; $hostname = $this->option('multiple') ? $community : 'snmpsim';
$device = Device::firstOrNew(['hostname' => $hostname]); $device = Device::firstOrNew(['hostname' => $hostname]);
$action = $device->exists ? 'updated' : 'added'; $action = $device->exists ? 'updated' : 'added';