mirror of
https://github.com/snipe/snipe-it.git
synced 2024-12-24 21:24:13 -08:00
Add the withTrashed() method to requestingUser() method in CheckoutRequest model, so the view of requestable assets doesn't crash
This commit is contained in:
parent
4845a88c68
commit
ec8cb1b09e
|
@ -18,7 +18,7 @@ class CheckoutRequest extends Model
|
|||
|
||||
public function requestingUser()
|
||||
{
|
||||
return $this->user()->first();
|
||||
return $this->user()->withTrashed()->first();
|
||||
}
|
||||
|
||||
public function requestedItem()
|
||||
|
|
|
@ -89,7 +89,7 @@
|
|||
@endif
|
||||
</td>
|
||||
<td>
|
||||
@if ($request->requestingUser())
|
||||
@if ($request->requestingUser() && !$request->requestingUser()->trashed())
|
||||
<a href="{{ config('app.url') }}/users/{{ $request->requestingUser()->id }}">
|
||||
{{ $request->requestingUser()->present()->fullName() }}
|
||||
</a>
|
||||
|
|
Loading…
Reference in a new issue