diff --git a/CHANGELOG.md b/CHANGELOG.md index 3e10fc0..cf9647e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,10 @@ and this project adheres to [Semantic Versioning](http://semver.org/). ## [UNRELEASE] +### Fixed + +- Fix `Undefined array key "id"` when computer not already linkedo agent + ## [1.0.4] - 2025-09-04 ### Fixed diff --git a/inc/task.class.php b/inc/task.class.php index 6154a62..e144139 100644 --- a/inc/task.class.php +++ b/inc/task.class.php @@ -138,7 +138,7 @@ public static function handleInventoryTask(array $params) $database_param_found = []; // only Computer type - if (get_class($computer) == Computer::getType()) { + if (get_class($computer) == Computer::getType() && !$computer->isNewItem()) { $database_param_table = PluginDatabaseinventoryDatabaseParam::getTable() ; $database_param_computergroup_table = PluginDatabaseinventoryDatabaseParam_ComputerGroup::getTable(); $computer_group_static_table = PluginDatabaseinventoryComputerGroupStatic::getTable();