fix: [encryption keys] functionality to filter orgs/individuals fixed

- actually execute the query rather than just build it
pull/85/head
iglocska 2022-01-18 14:59:41 +01:00
parent a29a4ea024
commit c35d67ebca
No known key found for this signature in database
GPG Key ID: BEA224F1FEF113AC
1 changed files with 2 additions and 8 deletions

View File

@ -90,14 +90,8 @@ class EncryptionKeysController extends AppController
$this->loadModel('Organisations');
$this->loadModel('Individuals');
$dropdownData = [
'organisation' => $this->Organisations->find('list', [
'sort' => ['name' => 'asc'],
'conditions' => $orgConditions
]),
'individual' => $this->Individuals->find('list', [
'sort' => ['email' => 'asc'],
'conditions' => $individualConditions
])
'organisation' => $this->Organisations->find('list')->order(['name' => 'asc'])->where($orgConditions)->all()->toArray(),
'individual' => $this->Individuals->find('list')->order(['email' => 'asc'])->where($individualConditions)->all()->toArray()
];
return $params;
}