mirror of
https://github.com/librenms/librenms.git
synced 2024-10-07 16:52:45 +00:00
fix call to shortDisplayName on null in MuninPluginController (#10126)
MuninPluginController did not ask for device_id in baseQuery, hence later it was impossible to construct valid Device model causing subsequent call to shortDisplayName in formatItem to be on NULL.
This commit is contained in:
@@ -42,7 +42,7 @@ class MuninPluginController extends SelectController
|
||||
->with(['device' => function ($query) {
|
||||
$query->select('device_id', 'hostname', 'sysName');
|
||||
}])
|
||||
->select('mplug_id', 'mplug_type');
|
||||
->select('mplug_id', 'mplug_type', 'device_id');
|
||||
}
|
||||
|
||||
public function formatItem($munin_plugin)
|
||||
|
||||
Reference in New Issue
Block a user