mirror of
https://github.com/snipe/snipe-it.git
synced 2024-12-25 21:54:14 -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()
|
public function requestingUser()
|
||||||
{
|
{
|
||||||
return $this->user()->first();
|
return $this->user()->withTrashed()->first();
|
||||||
}
|
}
|
||||||
|
|
||||||
public function requestedItem()
|
public function requestedItem()
|
||||||
|
|
|
@ -89,7 +89,7 @@
|
||||||
@endif
|
@endif
|
||||||
</td>
|
</td>
|
||||||
<td>
|
<td>
|
||||||
@if ($request->requestingUser())
|
@if ($request->requestingUser() && !$request->requestingUser()->trashed())
|
||||||
<a href="{{ config('app.url') }}/users/{{ $request->requestingUser()->id }}">
|
<a href="{{ config('app.url') }}/users/{{ $request->requestingUser()->id }}">
|
||||||
{{ $request->requestingUser()->present()->fullName() }}
|
{{ $request->requestingUser()->present()->fullName() }}
|
||||||
</a>
|
</a>
|
||||||
|
|
Loading…
Reference in a new issue