Skip to content
Snippets Groups Projects
Commit 2d52bb03 authored by Guillaume Heurtier's avatar Guillaume Heurtier
Browse files

FEAT #12091 TIME 0:50 fixed bug if item_id in listmodels is empty

parent f0748417
No related branches found
No related tags found
No related merge requests found
......@@ -269,6 +269,10 @@ class ListTemplateController
$listTemplates = ListTemplateModel::get(['select' => ['*'], 'where' => ['object_id = ?'], 'data' => [$entity['entity_id']]]);
foreach ($listTemplates as $key => $value) {
if ($value['item_id'] == '') {
unset($listTemplates[$key]);
continue;
}
if ($value['item_type'] == 'entity_id') {
$listTemplates[$key]['labelToDisplay'] = Entitymodel::getByEntityId(['entityId' => $value['item_id'], 'select' => ['entity_label']])['entity_label'];
$listTemplates[$key]['descriptionToDisplay'] = '';
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment