Skip to content

Commit

Permalink
FIX: use orm for generating where rather than sql (#56)
Browse files Browse the repository at this point in the history
  • Loading branch information
wilr committed Sep 20, 2023
1 parent 467885d commit 791cf48
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/Extension/BaseElementExtension.php
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down

0 comments on commit 791cf48

Please sign in to comment.