diff --git a/resources/views/mail/markdown/checkin-license.blade.php b/resources/views/mail/markdown/checkin-license.blade.php index d6e146a962..75573cf31d 100644 --- a/resources/views/mail/markdown/checkin-license.blade.php +++ b/resources/views/mail/markdown/checkin-license.blade.php @@ -10,7 +10,7 @@ @if (isset($license->manufacturer)) | **{{ trans('general.manufacturer') }}** | {{ $license->manufacturer->name }} | @endif -@if (($target instanceof \App\Models\User && $target->can('view', $license)) ||($target instanceof \App\Models\Asset && $license_seat->user->can('view', $license))) +@if (($target instanceof \App\Models\User && $target->can('view', $license)) ||($target instanceof \App\Models\Asset && $license_seat->user?->can('view', $license))) | **Key** | {{ $license->serial }} | @endif @if (isset($item->category)) diff --git a/resources/views/mail/markdown/checkout-license.blade.php b/resources/views/mail/markdown/checkout-license.blade.php index 2c4cd39cc4..5d982d1b1b 100644 --- a/resources/views/mail/markdown/checkout-license.blade.php +++ b/resources/views/mail/markdown/checkout-license.blade.php @@ -16,7 +16,7 @@ @if (isset($license->category)) | **{{ trans('general.category') }}** | {{ $license->category->name }} | @endif -@if (($target instanceof \App\Models\User && $target->can('view', $license)) || ($target instanceof \App\Models\Asset && $license_seat->user->can('view', $license))) +@if (($target instanceof \App\Models\User && $target->can('view', $license)) || ($target instanceof \App\Models\Asset && $license_seat->user?->can('view', $license))) | **Key** | {{ $license->serial }} | @endif @if ($note)