fix(models): handle empty location IDs in saveSortOrder method

Signed-off-by: objecttothis <17935339+objecttothis@users.noreply.github.com>
This commit is contained in:
objecttothis committed 2026-08-19 15:46:55 +04:00
1 parent bd66506ce4
commit bdfcf07fe1
1 file changed
+4
+4
View File
@@ -182,6 +182,10 @@ class Stock_location extends Model
*/
public function saveSortOrder(array $orderedLocationIds): bool
{
if (empty($orderedLocationIds)) {
return true;
}
$table = $this->db->prefixTable('stock_locations');
$builder = $this->db->table('stock_locations');