From ab7d8bbb899a50dcb756feeae254809cc1108b02 Mon Sep 17 00:00:00 2001 From: Kartik Patel Date: Fri, 3 Dec 2021 12:46:45 +1300 Subject: [PATCH] Use SS search rather then SQL where --- src/Service/AlgoliaIndexer.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Service/AlgoliaIndexer.php b/src/Service/AlgoliaIndexer.php index b776960..0cecfd6 100644 --- a/src/Service/AlgoliaIndexer.php +++ b/src/Service/AlgoliaIndexer.php @@ -285,7 +285,7 @@ public function exportAttributesFromRelationship($item, $relationship, $attribut */ public function deleteItem($itemClass, $itemUUID) { - $item = DataObject::get_one($itemClass, ['AlgoliaUUID' => $itemUUID]); + $item = DataObject::get($itemClass)->find('AlgoliaUUID', $itemUUID); if (!$item || !$item->isInDB()) { return false;