mirror of
https://github.com/snipe/snipe-it.git
synced 2025-03-05 20:52:15 -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') {
|
if ($actionlog->action_type == 'accepted') {
|
||||||
$file_url = route('log.storedeula.download', ['filename' => $actionlog->filename]);
|
$file_url = route('log.storedeula.download', ['filename' => $actionlog->filename]);
|
||||||
} else {
|
} else {
|
||||||
|
if ($actionlog->item) {
|
||||||
if ($actionlog->itemType() == 'asset') {
|
if ($actionlog->itemType() == 'asset') {
|
||||||
$file_url = route('show/assetfile', ['assetId' => $actionlog->item->id, 'fileId' => $actionlog->id]);
|
$file_url = route('show/assetfile', ['assetId' => $actionlog->item->id, 'fileId' => $actionlog->id]);
|
||||||
} elseif ($actionlog->itemType() == 'license') {
|
} elseif ($actionlog->itemType() == 'license') {
|
||||||
|
@ -69,6 +70,7 @@ class ActionlogsTransformer
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
$array = [
|
$array = [
|
||||||
'id' => (int) $actionlog->id,
|
'id' => (int) $actionlog->id,
|
||||||
|
|
Loading…
Reference in a new issue