mirror of
https://github.com/snipe/snipe-it.git
synced 2025-03-05 20:52:15 -08:00
Fixed #6175 - crashing when accessory has been deleted
My guess would be this crash (reported in #6175) was happening because of deleted accessories/accessory rows.
This commit is contained in:
parent
5faf8bfcd0
commit
5da9120870
|
@ -149,7 +149,7 @@
|
||||||
@endphp
|
@endphp
|
||||||
|
|
||||||
@foreach ($accessories as $accessory)
|
@foreach ($accessories as $accessory)
|
||||||
|
@if ($accessory)
|
||||||
<tr>
|
<tr>
|
||||||
<td>{{ $acounter }}</td>
|
<td>{{ $acounter }}</td>
|
||||||
<td>{{ ($accessory->manufacturer) ? $accessory->manufacturer->name : '' }} {{ $accessory->name }} {{ $accessory->model_number }}</td>
|
<td>{{ ($accessory->manufacturer) ? $accessory->manufacturer->name : '' }} {{ $accessory->name }} {{ $accessory->model_number }}</td>
|
||||||
|
@ -159,6 +159,7 @@
|
||||||
@php
|
@php
|
||||||
$acounter++
|
$acounter++
|
||||||
@endphp
|
@endphp
|
||||||
|
@endif
|
||||||
@endforeach
|
@endforeach
|
||||||
</table>
|
</table>
|
||||||
@endif
|
@endif
|
||||||
|
|
Loading…
Reference in a new issue