Skip to content

Commit 120f28e

Browse files
Update inc/containerdisplaycondition.class.php
Co-authored-by: Romain B. <8530352+Rom1-B@users.noreply.github.com>
1 parent 7e4b855 commit 120f28e

1 file changed

Lines changed: 2 additions & 6 deletions

File tree

inc/containerdisplaycondition.class.php

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -326,12 +326,8 @@ public static function getRawValue($searchoption_id, $itemtype, $value)
326326
$raw_value = '';
327327

328328
if ($so['datatype'] == 'dropdown' || ($so['datatype'] == 'itemlink' && $so['table'] !== $itemtypetable)) {
329-
//No need to call for getItemForItemType if we are in the case of a custom asset
330-
if ($so['table'] == 'glpi_assets_assettypes') {
331-
$dropdown_itemtype = $so['itemtype'];
332-
} else {
333-
$dropdown_itemtype = getItemTypeForTable($so['table']);
334-
}
329+
//No need to call getItemTypeForTable if we are in the case of a custom asset
330+
$dropdown_itemtype = $so['itemtype'] ?? getItemTypeForTable($so['table']);
335331

336332
$dbu = new DbUtils();
337333
$dropdown = $dbu->getItemForItemtype($dropdown_itemtype);

0 commit comments

Comments
 (0)