diff --git a/CHANGELOG.md b/CHANGELOG.md index 769eac0..7dd28c1 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,10 @@ and this project adheres to [Semantic Versioning](http://semver.org/). ## [UNRELEASED] +### Fixed + +- Fix bad SQL Query `Unknown column 'itemtype' in 'WHERE' ` + ## [1.1.2] - 2025-11-25 ### Fixed diff --git a/inc/inventoryaction.class.php b/inc/inventoryaction.class.php index 77e8f3c..4fde077 100644 --- a/inc/inventoryaction.class.php +++ b/inc/inventoryaction.class.php @@ -147,8 +147,8 @@ private static function findAgent(Computer $item) if (!$has_agent && $item->getType() == 'Computer') { $citem = new Asset_PeripheralAsset(); $has_relation = $citem->getFromDBByCrit([ - 'itemtype' => $item->getType(), - 'items_id' => $item->fields['id'], + 'itemtype_peripheral' => $item->getType(), + 'items_id_peripheral' => $item->fields['id'], ]); if ($has_relation) { $has_agent = $agent->getFromDBByCrit([