Skip to content

A free open source IT asset/license management system

adds check that asset has asset status before checking archived

Godfrey M24bb6793053f
diff --git a/app/Notifications/CheckinAssetNotification.php b/app/Notifications/CheckinAssetNotification.php
index fa4780c1fd..0242981173 100644
--- a/app/Notifications/CheckinAssetNotification.php
+++ b/app/Notifications/CheckinAssetNotification.php
@@ -143,7 +143,7 @@ class CheckinAssetNotification extends Notification
KeyValue::create(
trans('mail.checked_into') ?: '',
$item->location->name ? $item->location->name : '',
- trans('admin/hardware/form.status').": ".$item->assetstatus->name,
+ trans('admin/hardware/form.status').": ".$item->assetstatus?->name,
)
->onClick(route('hardware.show', $item->id))
)
diff --git a/resources/views/locations/print.blade.php b/resources/views/locations/print.blade.php
index 9f54978ff5..a047f02279 100644
--- a/resources/views/locations/print.blade.php
+++ b/resources/views/locations/print.blade.php
@@ -126,7 +126,7 @@
@foreach ($assets as $asset)
@php
- if($snipeSettings->show_archived_in_list != 1 && $asset->assetstatus->archived == 1){
+ if($snipeSettings->show_archived_in_list != 1 && $asset->assetstatus?->archived == 1){
continue;
}
@endphp