Fixes indefined item in user select blade

This commit is contained in:
snipe 2017-10-28 15:42:55 -07:00
parent 9687a78981
commit 3b498efee1

View file

@ -4,7 +4,7 @@
<div class="col-md-7 required">
<select class="js-data-ajax" data-endpoint="users" name="{{ $fieldname }}" style="width: 100%" id="assigned_user_select">
@if ($user_id = Input::old($fieldname, $item->{$fieldname}))
@if ($user_id = Input::old($fieldname, (isset($item)) ? $item->{$fieldname} : ''))
<option value="{{ $user_id }}" selected="selected">
{{ \App\Models\User::find($user_id)->present()->fullName }}
</option>