Validates if model and model->category exist before return the checkin_email property

This commit is contained in:
Ivan Nieto Vivanco 2022-02-10 11:58:55 -06:00
parent 9892e5bf60
commit bf4ee18123

View file

@ -816,8 +816,10 @@ class Asset extends Depreciable
*/
public function checkin_email()
{
if (($this->model) && ($this->model->category)) {
return $this->model->category->checkin_email;
}
}
/**
* Determine whether this asset requires acceptance by the assigned user