mirror of
https://github.com/librenms/librenms.git
synced 2024-10-07 16:52:45 +00:00
Fix DeviceCache method calls (#10823)
missed from when it was a static class...
This commit is contained in:
@@ -37,7 +37,7 @@ class Device
|
||||
*/
|
||||
public function getPrimary() : \App\Models\Device
|
||||
{
|
||||
return self::get($this->primary);
|
||||
return $this->get($this->primary);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -60,7 +60,7 @@ class Device
|
||||
public function get($device_id) : \App\Models\Device
|
||||
{
|
||||
if (!array_key_exists($device_id, $this->devices)) {
|
||||
return self::load($device_id);
|
||||
return $this->load($device_id);
|
||||
}
|
||||
|
||||
return $this->devices[$device_id] ?: new \App\Models\Device;
|
||||
@@ -92,7 +92,7 @@ class Device
|
||||
public function refresh($device_id) : \App\Models\Device
|
||||
{
|
||||
unset($this->devices[$device_id]);
|
||||
return self::get($device_id);
|
||||
return $this->get($device_id);
|
||||
}
|
||||
|
||||
/**
|
||||
|
Reference in New Issue
Block a user