diff --git a/app/Models/Asset.php b/app/Models/Asset.php index 324034992c..a1dc0bd93a 100644 --- a/app/Models/Asset.php +++ b/app/Models/Asset.php @@ -184,7 +184,7 @@ class Asset extends Depreciable } else { $user_name = "Unassigned"; } - return $this->asset_tag . ' - ' . $this->name . ' (' . $user_name . ') ' . $this->model->name; + return $this->asset_tag . ' - ' . $this->name . ' (' . $user_name . ') ' . ($this->model) ? $this->model->name: ''; } public function validationRules($id = '0')