One more fix for custom reports

This commit is contained in:
snipe 2017-11-06 10:44:18 -08:00
parent 936ff707c7
commit a9d9234fb3

View file

@ -596,7 +596,12 @@ class ReportsController extends Controller
if (e(Input::get('employee_num')) == '1') { if (e(Input::get('employee_num')) == '1') {
// Only works if we're checked out to a user, not anything else. // Only works if we're checked out to a user, not anything else.
if ($asset->checkedOutToUser()) { if ($asset->checkedOutToUser()) {
$row[] = '"' .e($asset->assignedto->employee_num). '"'; if ($asset->assignedto) {
$row[] = '"' .e($asset->assignedto->employee_num). '"';
} else {
$row[] = ''; // Empty string if unassigned
}
} else { } else {
$row[] = ''; // Empty string if unassigned $row[] = ''; // Empty string if unassigned
} }