diff --git a/app/Views/configs/stock_config.php b/app/Views/configs/stock_config.php index e5fe17ce6..f4084961e 100644 --- a/app/Views/configs/stock_config.php +++ b/app/Views/configs/stock_config.php @@ -120,10 +120,12 @@ }, { type: response.success ? 'success' : 'danger' }); - $("#stock_locations").load('', function() { - init_add_remove_locations(); - init_sortable_locations(); - }); + if (response.success) { + $("#stock_locations").load('', function() { + init_add_remove_locations(); + init_sortable_locations(); + }); + } }, dataType: 'json' });