mirror of
https://github.com/opensourcepos/opensourcepos.git
synced 2026-09-21 02:07:23 -04:00
fix(models): handle empty location IDs in saveSortOrder method
Signed-off-by: objecttothis <17935339+objecttothis@users.noreply.github.com>
This commit is contained in:
1 parent
bd66506ce4
commit
bdfcf07fe1
1 file changed
+4
@@ -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');
|
||||
|
||||
Reference in new issue
Block a user