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:
CirnoT
2019-04-19 15:12:33 +02:00
committed by Tony Murray
parent d901d308d2
commit 141eab11ca

View File

@@ -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)