mirror of
https://github.com/librenms/librenms.git
synced 2024-10-07 16:52:45 +00:00
Fix sensor discover when device_id is omitted (#16389)
This commit is contained in:
@@ -47,6 +47,7 @@ class Sensor
|
||||
|
||||
public function discover(\App\Models\Sensor $sensor): static
|
||||
{
|
||||
$sensor->device_id ??= \DeviceCache::getPrimary()->device_id;
|
||||
$this->models->push($sensor);
|
||||
$this->discovered[$sensor->syncGroup()] = false;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user