Skip to content

A free open source IT asset/license management system

Check that the user has assets and that the aset model is valid

snipe0e93495ca27c
diff --git a/resources/views/users/view.blade.php b/resources/views/users/view.blade.php
index 49ddb03c61..09d30178ab 100755
--- a/resources/views/users/view.blade.php
+++ b/resources/views/users/view.blade.php
@@ -340,10 +340,11 @@
</tr>
</thead>
<tbody>
+ @if ($user->assets)
@foreach ($user->assets as $asset)
<tr>
<td>
- @if ($asset->physical=='1')
+ @if (($asset->model) && ($asset->physical=='1'))
<a href="{{ route('models.show', $asset->model->id) }}">{{ $asset->model->name }}</a>
@endif
</td>
@@ -360,6 +361,7 @@
</td>
</tr>
@endforeach
+ @endif
</tbody>
</table>
</div>