Skip to content

Commit

Permalink
Fix #3554
Browse files Browse the repository at this point in the history
  • Loading branch information
lukeholder committed Jun 24, 2024
1 parent 5e8d4b4 commit dd535c1
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/controllers/OrderStatusesController.php
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,10 @@ public function actionSave(): void
}

if (!$id) {
$orderStatus->sortOrder = (new Query())->from(Table::ORDERSTATUSES)->where(['storeId' => $storeId])->max('sortOrder') + 1;
$orderStatus->sortOrder = (new Query())
->from(Table::ORDERSTATUSES)
->where(['storeId' => $storeId])
->max("[[sortOrder]]") + 1;
}

// Save it
Expand Down

0 comments on commit dd535c1

Please sign in to comment.