mirror of https://github.com/MISP/MISP
fix: Fixed an issue where adding an attribute to an empty temlate as a first element caused an error, fixes #1635
parent
6f2ba400e8
commit
d0a65e96c2
|
@ -27,6 +27,9 @@ class TemplateElement extends AppModel {
|
|||
'order' => array('id'),
|
||||
'group' => array('id')
|
||||
));
|
||||
if (empty($result)) {
|
||||
return 0;
|
||||
}
|
||||
return $result[0]['pos'];
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue