fix: [crud:index] Only include requested metafields for non-API queries
parent
fce564f798
commit
b9292473de
|
@ -76,10 +76,9 @@ class CRUDComponent extends Component
|
|||
if (!empty($options['order'])) {
|
||||
$query->order($options['order']);
|
||||
}
|
||||
if ($this->Controller->ParamHandler->isRest()) {
|
||||
if ($this->metaFieldsSupported()) {
|
||||
$query = $this->includeRequestedMetaFields($query);
|
||||
}
|
||||
if ($this->metaFieldsSupported() && !$this->Controller->ParamHandler->isRest()) {
|
||||
$query = $this->includeRequestedMetaFields($query);
|
||||
}
|
||||
if (!$this->Controller->ParamHandler->isRest()) {
|
||||
$this->setRequestedEntryAmount();
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue