mirror of
https://github.com/librenms/librenms.git
synced 2024-10-07 16:52:45 +00:00
Fix Device::isUnderMaintenance() add location relation
This commit is contained in:
@@ -27,6 +27,7 @@ namespace LibreNMS\Alert;
|
||||
|
||||
use App\Models\Device;
|
||||
use App\Models\User;
|
||||
use DeviceCache;
|
||||
use LibreNMS\Config;
|
||||
use PHPMailer\PHPMailer\PHPMailer;
|
||||
|
||||
@@ -196,8 +197,7 @@ class AlertUtil
|
||||
*/
|
||||
public static function isMaintenance($device_id)
|
||||
{
|
||||
$device = Device::find($device_id);
|
||||
return !is_null($device) && $device->isUnderMaintenance();
|
||||
return DeviceCache::get($device_id)->isUnderMaintenance();
|
||||
}
|
||||
|
||||
/**
|
||||
|
Reference in New Issue
Block a user