Skip to content

Commit e8ccf54

Browse files
committed
fix: improved default sort value generation
1 parent b795ae4 commit e8ccf54

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/Model/BaseItem.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -260,7 +260,7 @@ public function canCreate($member = null, $context = array())
260260
public function onBeforeWrite()
261261
{
262262
parent::onBeforeWrite();
263-
if ($this->ID == 0) {
263+
if (!$this->Sort) {
264264
$this->Sort = static::get()->max('Sort') + 1;
265265
}
266266
}

0 commit comments

Comments
 (0)