Skip to content

Commit

Permalink
FIx issue with getting sort of BaseElement.
Browse files Browse the repository at this point in the history
  • Loading branch information
wilr authored Aug 3, 2018
1 parent e2944fc commit 6b4a9c9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Models/BaseElement.php
Original file line number Diff line number Diff line change
Expand Up @@ -242,7 +242,7 @@ public function onBeforeWrite()
if ($this->hasExtension(Versioned::class)) {
$records = Versioned::get_by_stage(BaseElement::class, Versioned::DRAFT);
} else {
$records = BaseElement::get()->max('Sort');
$records = BaseElement::get();
}

$records = $records->filter('ParentID', $this->ParentID);
Expand Down

0 comments on commit 6b4a9c9

Please sign in to comment.