Fixed widget and report alias issue.. ( #32baajc )

This commit is contained in:
Cüneyt Şentürk 2022-06-20 18:41:12 +03:00
parent 1c9068cfa9
commit 21cf287998
2 changed files with 2 additions and 2 deletions

View File

@ -54,7 +54,7 @@ class Reports
return false; return false;
} }
if (($model->alias != 'core') && (new static)->moduleIsDisabled($model->alias)) { if (! empty($model) && ($model->alias != 'core') && (new static)->moduleIsDisabled($model->alias)) {
return false; return false;
} }

View File

@ -65,7 +65,7 @@ class Widgets
$model = Widget::where('dashboard_id', session('dashboard_id'))->where('class', $class_name)->first(); $model = Widget::where('dashboard_id', session('dashboard_id'))->where('class', $class_name)->first();
if (($model->alias != 'core') && (new static)->moduleIsDisabled($model->alias)) { if (! empty($model) && ($model->alias != 'core') && (new static)->moduleIsDisabled($model->alias)) {
return false; return false;
} }