Skip to content

Commit 8080f97

Browse files
authored
Fix static sql error (#72)
* Fix(Computergroup): fix ba object reference * adapt CHANGELOG
1 parent 5128d0e commit 8080f97

File tree

3 files changed

+9
-8
lines changed

3 files changed

+9
-8
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/).
1111

1212
- Fix foreign key constraint in SQL query.
1313
- Fix `Undefined array key "glpiname"` during database inventory task.
14+
- Fix SQL error when add computer to static group .
1415

1516
## [1.0.3] - 2025-07-10
1617

inc/computergroupstatic.class.php

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -149,13 +149,13 @@ private static function showForItem(PluginDatabaseinventoryComputerGroup $comput
149149
TemplateRenderer::getInstance()->display(
150150
'@databaseinventory/computergroupstatic.html.twig',
151151
[
152-
'item' => PluginDatabaseinventoryDatabaseParam::getById($ID),
153-
'computerslist' => $listofcomputers,
154-
'groupstaticclass' => PluginDatabaseinventoryComputerGroupStatic::class,
155-
'canread' => $computergroup->can($ID, READ),
156-
'canedit' => $computergroup->can($ID, UPDATE),
157-
'canadd' => $computergroup->canAddItem('itemtype'),
158-
'used' => $used,
152+
'item' => PluginDatabaseinventoryComputerGroup::getById($ID),
153+
'computerslist' => $listofcomputers,
154+
'groupstaticclass' => PluginDatabaseinventoryComputerGroupStatic::class,
155+
'canread' => $computergroup->can($ID, READ),
156+
'canedit' => $computergroup->can($ID, UPDATE),
157+
'canadd' => $computergroup->canAddItem('itemtype'),
158+
'used' => $used,
159159
],
160160
);
161161

templates/computergroupstatic.html.twig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -123,4 +123,4 @@
123123
</form>
124124
{% endif %}
125125
{% endif %}
126-
{% endblock %}
126+
{% endblock %}

0 commit comments

Comments
 (0)