diff --git a/CHANGELOG.md b/CHANGELOG.md index c03a33e..5cdd8c0 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -11,6 +11,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/). - Fix foreign key constraint in SQL query. - Fix `Undefined array key "glpiname"` during database inventory task. +- Fix SQL error when add computer to static group . ## [1.0.3] - 2025-07-10 diff --git a/inc/computergroupstatic.class.php b/inc/computergroupstatic.class.php index 214a225..c48a14b 100644 --- a/inc/computergroupstatic.class.php +++ b/inc/computergroupstatic.class.php @@ -149,13 +149,13 @@ private static function showForItem(PluginDatabaseinventoryComputerGroup $comput TemplateRenderer::getInstance()->display( '@databaseinventory/computergroupstatic.html.twig', [ - 'item' => PluginDatabaseinventoryDatabaseParam::getById($ID), - 'computerslist' => $listofcomputers, - 'groupstaticclass' => PluginDatabaseinventoryComputerGroupStatic::class, - 'canread' => $computergroup->can($ID, READ), - 'canedit' => $computergroup->can($ID, UPDATE), - 'canadd' => $computergroup->canAddItem('itemtype'), - 'used' => $used, + 'item' => PluginDatabaseinventoryComputerGroup::getById($ID), + 'computerslist' => $listofcomputers, + 'groupstaticclass' => PluginDatabaseinventoryComputerGroupStatic::class, + 'canread' => $computergroup->can($ID, READ), + 'canedit' => $computergroup->can($ID, UPDATE), + 'canadd' => $computergroup->canAddItem('itemtype'), + 'used' => $used, ], ); diff --git a/templates/computergroupstatic.html.twig b/templates/computergroupstatic.html.twig index 10272cd..e41455d 100644 --- a/templates/computergroupstatic.html.twig +++ b/templates/computergroupstatic.html.twig @@ -123,4 +123,4 @@ {% endif %} {% endif %} -{% endblock %} \ No newline at end of file +{% endblock %}