mirror of
https://github.com/snipe/snipe-it.git
synced 2025-01-11 13:57:41 -08:00
Merge pull request #13859 from inietov/fixes/attempt_to_read_id_on_boolean
Fixed ErrorExemption: Attempt to read property "id" on bool [sc-23945]
This commit is contained in:
commit
9dc9834bcb
|
@ -144,7 +144,7 @@ class AssetImporter extends ItemImporter
|
||||||
// If we have a target to checkout to, lets do so.
|
// If we have a target to checkout to, lets do so.
|
||||||
//-- user_id is a property of the abstract class Importer, which this class inherits from and it's setted by
|
//-- user_id is a property of the abstract class Importer, which this class inherits from and it's setted by
|
||||||
//-- the class that needs to use it (command importer or GUI importer inside the project).
|
//-- the class that needs to use it (command importer or GUI importer inside the project).
|
||||||
if (isset($target)) {
|
if (isset($target) && ($target !== false)) {
|
||||||
if (!is_null($asset->assigned_to)){
|
if (!is_null($asset->assigned_to)){
|
||||||
if ($asset->assigned_to != $target->id){
|
if ($asset->assigned_to != $target->id){
|
||||||
event(new CheckoutableCheckedIn($asset, User::find($asset->assigned_to), Auth::user(), $asset->notes, date('Y-m-d H:i:s')));
|
event(new CheckoutableCheckedIn($asset, User::find($asset->assigned_to), Auth::user(), $asset->notes, date('Y-m-d H:i:s')));
|
||||||
|
|
Loading…
Reference in a new issue