fix: [internal] metafields can also be empty

pull/32/head
iglocska 2020-09-28 13:14:45 +02:00
parent 3bb4043d0e
commit 710851007b
No known key found for this signature in database
GPG Key ID: BEA224F1FEF113AC
1 changed files with 3 additions and 0 deletions

View File

@ -167,6 +167,9 @@ class CRUDComponent extends Component
public function getMetaFields($id, $data)
{
if (empty($this->Table->metaFields)) {
return $data;
}
$query = $this->MetaFields->find();
$query->where(['scope' => $this->Table->metaFields, 'parent_id' => $id]);
$metaFields = $query->all();