From 940323c0b72c9a77f32b77adac1e7eab91a0f090 Mon Sep 17 00:00:00 2001 From: James Cole Date: Fri, 12 Oct 2018 07:39:05 +0200 Subject: [PATCH] Small fix in auto complete controller. --- app/Http/Controllers/Json/AutoCompleteController.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/app/Http/Controllers/Json/AutoCompleteController.php b/app/Http/Controllers/Json/AutoCompleteController.php index 2aaeb29c03..975395635a 100644 --- a/app/Http/Controllers/Json/AutoCompleteController.php +++ b/app/Http/Controllers/Json/AutoCompleteController.php @@ -99,6 +99,7 @@ class AutoCompleteController extends Controller $search = (string)$request->get('search'); $unfiltered = null; $filtered = null; + $cache = new CacheProperties; $cache->addProperty($subject); // very unlikely a user will actually search for this string. @@ -156,7 +157,9 @@ class AutoCompleteController extends Controller if ('transaction_types' === $subject) { $unfiltered = $this->getTransactionTypes(); } - + if ('transaction-types' === $subject) { + $unfiltered = $this->getTransactionTypes(); + } // filter results $filtered = $this->filterResult($unfiltered, $search);