mirror of
https://github.com/snipe/snipe-it.git
synced 2025-01-12 14:27:33 -08:00
Validates if model and model->category exist before return the checkin_email property
This commit is contained in:
parent
2852359225
commit
f36de6c670
|
@ -830,7 +830,9 @@ class Asset extends Depreciable
|
|||
*/
|
||||
public function checkin_email()
|
||||
{
|
||||
return $this->model->category->checkin_email;
|
||||
if (($this->model) && ($this->model->category)) {
|
||||
return $this->model->category->checkin_email;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Reference in a new issue