Skip to content

Commit

Permalink
Merge pull request #44 from kartikpatel95/elemental-search-fix
Browse files Browse the repository at this point in the history
Use SS DataObject::get() rather then get_one()
  • Loading branch information
wilr authored Dec 3, 2021
2 parents 33ca9c2 + ab7d8bb commit f786648
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Service/AlgoliaIndexer.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit f786648

Please sign in to comment.