Skip to content
Snippets Groups Projects
Commit cf0e14a5 authored by Vinciane's avatar Vinciane
Browse files

FIX #9511 Add template_target in checkEntities

parent 7f3d8698
No related branches found
No related tags found
No related merge requests found
......@@ -241,8 +241,8 @@ abstract class TemplateModelAbstract
'select' => ['ta.value_field', 'e.entity_label'],
'table' => ['templates t','templates_association ta', 'entities e'],
'left_join' => ['ta.template_id = t.template_id', 'e.entity_id = ta.value_field'],
'where' => empty($data['template_id']) ? ['t.template_attachment_type = ?', 'value_field in (?)'] : ['t.template_attachment_type = ?', 'value_field in (?)', 't.template_id != (?)' ],
'data' => empty($data['template_id']) ? [$data['template_attachment_type'], $data['entities']] : [$data['template_attachment_type'], $data['entities'], $data['template_id']],
'where' => empty($data['template_id']) ? ['t.template_target = ?', 't.template_attachment_type = ?', 'value_field in (?)'] : ['t.template_target = ?', 't.template_attachment_type = ?', 'value_field in (?)', 't.template_id != (?)' ],
'data' => empty($data['template_id']) ? [$data['template_target'], $data['template_attachment_type'], $data['entities']] : [$data['template_target'], $data['template_attachment_type'], $data['entities'], $data['template_id']],
'groupBy' => ['ta.value_field', 'e.entity_label']
]);
......
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