mirror of
https://github.com/snipe/snipe-it.git
synced 2025-02-02 08:21:09 -08:00
Merge pull request #11000 from inietov/fixes/download_all_triggers_getDisplayNameAttribute_on_null
Fixes Activity Report Download all action fails creating the CSV report.
This commit is contained in:
commit
fd71b48489
|
@ -272,13 +272,18 @@ class ReportsController extends Controller
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if($actionlog->item){
|
||||||
|
$item_name = e($actionlog->item->getDisplayNameAttribute());
|
||||||
|
} else {
|
||||||
|
$item_name ='';
|
||||||
|
}
|
||||||
|
|
||||||
$row = [
|
$row = [
|
||||||
$actionlog->created_at,
|
$actionlog->created_at,
|
||||||
($actionlog->user) ? e($actionlog->user->getFullNameAttribute()) : '',
|
($actionlog->user) ? e($actionlog->user->getFullNameAttribute()) : '',
|
||||||
$actionlog->present()->actionType(),
|
$actionlog->present()->actionType(),
|
||||||
e($actionlog->itemType()),
|
e($actionlog->itemType()),
|
||||||
($actionlog->itemType()=='user') ? $actionlog->filename : e($actionlog->item->getDisplayNameAttribute()),
|
($actionlog->itemType()=='user') ? $actionlog->filename : $item_name,
|
||||||
$target_name,
|
$target_name,
|
||||||
($actionlog->note) ? e($actionlog->note): '',
|
($actionlog->note) ? e($actionlog->note): '',
|
||||||
$actionlog->log_meta,
|
$actionlog->log_meta,
|
||||||
|
|
Loading…
Reference in a new issue