From 188538651ac1ac00d5f4fb76b233456b3d9441c6 Mon Sep 17 00:00:00 2001 From: snipe Date: Fri, 4 May 2018 21:01:25 -0700 Subject: [PATCH] Fixed slack notification error if location is not set on checkin --- app/Notifications/CheckinAssetNotification.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/Notifications/CheckinAssetNotification.php b/app/Notifications/CheckinAssetNotification.php index a22ccae7cf..72a950fdcd 100644 --- a/app/Notifications/CheckinAssetNotification.php +++ b/app/Notifications/CheckinAssetNotification.php @@ -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)