fix: [internal] Throw NotFoundException for non exists UUID

pull/6146/head
Jakub Onderka 2020-07-27 13:21:39 +02:00
parent 72928cd6a2
commit 477a102d80
1 changed files with 3 additions and 0 deletions

View File

@ -12,6 +12,9 @@ class ToolboxComponent extends Component
'recursive' => -1,
'fields' => array($model->alias . '.id')
));
if (empty($data)) {
throw new NotFoundException(__('Invalid %s.', $model->alias));
}
return $data[$model->alias]['id'];
} else {
if (!is_numeric($id)) {