Check for valid user before trying to present the auditor name

Signed-off-by: snipe <snipe@snipe.net>
This commit is contained in:
snipe 2022-02-10 20:13:02 -08:00
parent 2ce44bd4e6
commit d406dc43c2

View file

@ -281,7 +281,10 @@
</div>
<div class="col-md-6">
{{ \App\Helpers\Helper::getFormattedDateObject($audit_log->created_at, 'date', false) }}
(by {{ link_to_route('users.show', $audit_log->user->present()->fullname(), [$audit_log->user->id]) }})
@if ($audit_log->user)
(by {{ link_to_route('users.show', $audit_log->user->present()->fullname(), [$audit_log->user->id]) }})
@endif
</div>
</div>
@endif