From c35d67ebcae81a17d5c627b57bfba27c2dd87eb8 Mon Sep 17 00:00:00 2001 From: iglocska Date: Tue, 18 Jan 2022 14:59:41 +0100 Subject: [PATCH] fix: [encryption keys] functionality to filter orgs/individuals fixed - actually execute the query rather than just build it --- src/Controller/EncryptionKeysController.php | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/src/Controller/EncryptionKeysController.php b/src/Controller/EncryptionKeysController.php index e04ebc0..ff2c16c 100644 --- a/src/Controller/EncryptionKeysController.php +++ b/src/Controller/EncryptionKeysController.php @@ -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; }