From 791cf488df18365876b1de9b4b7999ddae37cd2a Mon Sep 17 00:00:00 2001 From: Will Rossiter Date: Thu, 21 Sep 2023 09:08:42 +1200 Subject: [PATCH] FIX: use orm for generating where rather than sql (#56) --- src/Extension/BaseElementExtension.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/Extension/BaseElementExtension.php b/src/Extension/BaseElementExtension.php index 6385cb0..ffef266 100644 --- a/src/Extension/BaseElementExtension.php +++ b/src/Extension/BaseElementExtension.php @@ -56,7 +56,11 @@ public function populateDefaults() public function requireDefaultRecords() { - $update = BaseElement::get()->where('VirtualLookupTitle IS NULL AND AvailableGlobally = 1'); + $update = BaseElement::get()->filter([ + 'VirtualLookupTitle' => [null, ''], + 'AvailableGlobally' => 1 + ]); + $table = BaseElement::singleton()->baseTable(); foreach ($update as $element) {