From d120585f94f22e03692b86dd1a0d3ebed4bb1f82 Mon Sep 17 00:00:00 2001 From: snipe Date: Fri, 27 Sep 2024 14:07:30 +0100 Subject: [PATCH] Check for valid eula for license, consumable Signed-off-by: snipe --- resources/views/users/print.blade.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/resources/views/users/print.blade.php b/resources/views/users/print.blade.php index baba88b5fb..7fe92303b3 100644 --- a/resources/views/users/print.blade.php +++ b/resources/views/users/print.blade.php @@ -236,7 +236,7 @@ @foreach ($show_user->licenses as $license) @php - if ($license->category->getEula()) $eulas[] = $license->category->getEula() + if (($license->category) && ($license->category->getEula())) $eulas[] = $license->category->getEula() @endphp {{ $lcounter }} @@ -294,7 +294,7 @@ @foreach ($show_user->accessories as $accessory) @if ($accessory) @php - if ($accessory->category->getEula()) $eulas[] = $accessory->category->getEula() + if (($accessory->category) && ($accessory->category->getEula())) $eulas[] = $accessory->category->getEula() @endphp {{ $acounter }} @@ -357,7 +357,7 @@ @foreach ($show_user->consumables as $consumable) @if ($consumable) @php - if ($consumable->category->getEula()) $eulas[] = $consumable->category->getEula() + if (($consumable->category) && ($consumable->category->getEula())) $eulas[] = $consumable->category->getEula() @endphp {{ $ccounter }}