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:
snipe 2018-10-31 10:23:32 -07:00
parent 5faf8bfcd0
commit 5da9120870

View file

@ -149,7 +149,7 @@
@endphp
@foreach ($accessories as $accessory)
@if ($accessory)
<tr>
<td>{{ $acounter }}</td>
<td>{{ ($accessory->manufacturer) ? $accessory->manufacturer->name : '' }} {{ $accessory->name }} {{ $accessory->model_number }}</td>
@ -159,6 +159,7 @@
@php
$acounter++
@endphp
@endif
@endforeach
</table>
@endif