chg: [attribute] rearranging fixed

pull/8796/head
iglocska 2022-11-28 11:05:34 +01:00
parent b78d73ac0f
commit afbe08d256
No known key found for this signature in database
GPG Key ID: BEA224F1FEF113AC
1 changed files with 8 additions and 1 deletions

View File

@ -1705,7 +1705,14 @@ class Attribute extends AppModel
if (empty($options['flatten'])) {
$params['conditions']['AND'][] = array('Attribute.object_id' => 0);
}
$params['order'] = isset($options['order']) ? $options['order'] : [];
$params['order'] = [];
if (!empty($options['order'])) {
$options['order'] = $this->findOrder(
$options['order'],
'Attribute',
['id', 'event_id', 'object_id', 'type', 'category', 'value', 'distribution', 'timestamp', 'object_relation']
);
}
if (!isset($options['withAttachments'])) {
$options['withAttachments'] = false;
}