From 4f33260663da6cc35820827aa97045cde031eed5 Mon Sep 17 00:00:00 2001 From: Stanislas Kita Date: Thu, 30 Apr 2026 11:27:39 +0200 Subject: [PATCH 1/2] Fix(Core): Prevent MySQL error due to bad column --- inc/inventoryaction.class.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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([ From 737edfad7fa065b696f3e6b414768172a7874593 Mon Sep 17 00:00:00 2001 From: Stanislas Kita Date: Thu, 30 Apr 2026 11:28:20 +0200 Subject: [PATCH 2/2] adapt changelog --- CHANGELOG.md | 4 ++++ 1 file changed, 4 insertions(+) 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