mirror of
https://github.com/snipe/snipe-it.git
synced 2025-02-21 03:15:45 -08:00
Merge pull request #12473 from inietov/fixes/rollbar_attempt_to_read_property_on_null
Fixed ErrorException: Attempt to read property "id" on null [sc-19855]
This commit is contained in:
commit
057f0be20a
|
@ -60,6 +60,7 @@ class ActionlogsTransformer
|
|||
if ($actionlog->action_type == 'accepted') {
|
||||
$file_url = route('log.storedeula.download', ['filename' => $actionlog->filename]);
|
||||
} else {
|
||||
if ($actionlog->item) {
|
||||
if ($actionlog->itemType() == 'asset') {
|
||||
$file_url = route('show/assetfile', ['assetId' => $actionlog->item->id, 'fileId' => $actionlog->id]);
|
||||
} elseif ($actionlog->itemType() == 'license') {
|
||||
|
@ -69,6 +70,7 @@ class ActionlogsTransformer
|
|||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
$array = [
|
||||
'id' => (int) $actionlog->id,
|
||||
|
|
Loading…
Reference in a new issue