diff --git a/app/Notifications/CheckinAssetNotification.php b/app/Notifications/CheckinAssetNotification.php index 50745b1b27..77cd6d9b5a 100644 --- a/app/Notifications/CheckinAssetNotification.php +++ b/app/Notifications/CheckinAssetNotification.php @@ -162,7 +162,7 @@ class CheckinAssetNotification extends Notification $message = (new MailMessage)->markdown('notifications.markdown.checkin-asset', [ 'item' => $this->item, - 'status' => $this->item->assetstatus->name ?: '', + 'status' => $this->item->assetstatus?->name, 'admin' => $this->admin, 'note' => $this->note, 'target' => $this->target, diff --git a/app/Notifications/CheckoutAssetNotification.php b/app/Notifications/CheckoutAssetNotification.php index 352b088dba..5ebde7e4f7 100644 --- a/app/Notifications/CheckoutAssetNotification.php +++ b/app/Notifications/CheckoutAssetNotification.php @@ -209,7 +209,7 @@ public function toGoogleChat() [ 'item' => $this->item, 'admin' => $this->admin, - 'status' => $this->item->assetstatus->name ?: '', + 'status' => $this->item->assetstatus?->name, 'note' => $this->note, 'target' => $this->target, 'fields' => $fields,