Skip to content

Commit

Permalink
Fix for error when asset has null status
Browse files Browse the repository at this point in the history
  • Loading branch information
snipe committed Feb 11, 2015
1 parent cd5a352 commit 342a8b8
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion app/views/backend/hardware/index.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -134,13 +134,15 @@
@endif

<td>
@if (($asset->assetstatus->deployable == 1 ) && ($asset->deleted_at==''))

@if (($asset->assetstatus) && (($asset->assetstatus->deployable == 1 ) && ($asset->deleted_at=='')))
@if (($asset->assigned_to !='') && ($asset->assigned_to > 0))
<a href="{{ route('checkin/hardware', $asset->id) }}" class="btn btn-primary">@lang('general.checkin')</a>
@else
<a href="{{ route('checkout/hardware', $asset->id) }}" class="btn btn-info">@lang('general.checkout')</a>
@endif
@endif

</td>
<td nowrap="nowrap">

Expand Down

0 comments on commit 342a8b8

Please sign in to comment.