Skip to content

Commit

Permalink
fix: improved default sort value generation
Browse files Browse the repository at this point in the history
  • Loading branch information
mleutenegger committed Apr 19, 2024
1 parent b795ae4 commit e8ccf54
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Model/BaseItem.php
Original file line number Diff line number Diff line change
Expand Up @@ -260,7 +260,7 @@ public function canCreate($member = null, $context = array())
public function onBeforeWrite()
{
parent::onBeforeWrite();
if ($this->ID == 0) {
if (!$this->Sort) {
$this->Sort = static::get()->max('Sort') + 1;
}
}
Expand Down

0 comments on commit e8ccf54

Please sign in to comment.