fix: [CRUD] run afterfind even if no metatemplates set

pull/184/head
iglocska 2024-08-28 16:13:09 +02:00
parent e39ece57c5
commit 5048c38ed6
No known key found for this signature in database
GPG Key ID: BEA224F1FEF113AC
1 changed files with 3 additions and 3 deletions

View File

@ -432,10 +432,10 @@ class CRUDComponent extends Component
if ($metaFieldsEnabled) { if ($metaFieldsEnabled) {
$metaTemplates = $this->getMetaTemplates(); $metaTemplates = $this->getMetaTemplates();
$data = $this->attachMetaTemplatesIfNeeded($data, $metaTemplates->toArray()); $data = $this->attachMetaTemplatesIfNeeded($data, $metaTemplates->toArray());
}
if (isset($params['afterFind'])) { if (isset($params['afterFind'])) {
$data = $params['afterFind']($data, $params); $data = $params['afterFind']($data, $params);
} }
}
if ($this->request->is('post')) { if ($this->request->is('post')) {
$patchEntityParams = [ $patchEntityParams = [
'associated' => [], 'associated' => [],