Check for adminuser withTrashed

Signed-off-by: snipe <snipe@snipe.net>
This commit is contained in:
snipe 2025-02-26 08:25:22 +00:00
parent 93dab12461
commit 992214fc66
2 changed files with 2 additions and 2 deletions

View file

@ -234,7 +234,7 @@ class AssetModel extends SnipeModel
*/ */
public function adminuser() public function adminuser()
{ {
return $this->belongsTo(\App\Models\User::class, 'created_by'); return $this->belongsTo(\App\Models\User::class, 'created_by')->withTrashed();
} }

View file

@ -164,7 +164,7 @@
</li> </li>
@endif @endif
@if ($model->created_by) @if ($model->adminuser)
<li>{{ trans('general.created_by') }}: <li>{{ trans('general.created_by') }}:
{{ $model->adminuser->present()->name() }} {{ $model->adminuser->present()->name() }}
</li> </li>