Fixed slack notification error if location is not set on checkin

This commit is contained in:
snipe 2018-05-04 21:01:25 -07:00
parent a9fc7e04e9
commit 188538651a

View file

@ -76,7 +76,7 @@ class CheckinAssetNotification extends Notification
$fields = [
trans('general.administrator') => '<'.$admin->present()->viewUrl().'|'.$admin->present()->fullName().'>',
trans('general.status') => $item->assetstatus->name,
trans('general.location') => $item->location->name,
trans('general.location') => ($item->location) ? $item->location->name : '',
];
return (new SlackMessage)