Skip to content

Commit 2fdfc4d

Browse files
committed
add check
1 parent 7993d30 commit 2fdfc4d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

templates/container.class.tpl

+1-1
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ class %%CLASSNAME%% extends CommonDBTM
3333
if ($DB->numrows($result) > 0) {
3434
while ($data = $DB->fetchAssoc($result)) {
3535
//set default value for type 'glpi_item'
36-
if (str_starts_with($data['Field'], 'itemtype_')) {
36+
if (str_starts_with($data['Field'], 'itemtype_') && $data['Default'] != 'NULL') {
3737
$migration->changeField($table, $data['Field'], $data['Field'], "varchar(100) DEFAULT NULL");
3838
$migration->migrationOneTable(self::getTable());
3939
}

0 commit comments

Comments
 (0)