mirror of
https://github.com/librenms/librenms.git
synced 2024-10-07 16:52:45 +00:00
Handle missing device when linking (#16164)
* Handle missing device when linking Sometimes a device is gone, but data still points to it. Prevent error when that happens (even though it should not) * Handle more gracefully * Remove original work around * Allow unsaved devices, we just need device_id really
This commit is contained in:
@@ -46,6 +46,10 @@ class DeviceLink extends Component
|
||||
*/
|
||||
public function render()
|
||||
{
|
||||
if (empty($this->device->device_id)) {
|
||||
return view('components.device-link-missing');
|
||||
}
|
||||
|
||||
if (! $this->device->canAccess(auth()->user())) {
|
||||
return view('components.device-link-no-access');
|
||||
}
|
||||
|
Reference in New Issue
Block a user