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 08:12:33 -05:00
committed by Tony Murray
co-authored by Tony Murray
parent d901d308d2
commit 141eab11ca
@@ -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)