mirror of
https://github.com/ansible/awx.git
synced 2026-02-28 00:08:44 -03:30
Check if inventory is undefined before assigning pending_deletion flag
This commit is contained in:
@@ -106,7 +106,7 @@ function InventoriesList($scope,
|
|||||||
|
|
||||||
$scope.$on(`ws-inventories`, function(e, data){
|
$scope.$on(`ws-inventories`, function(e, data){
|
||||||
let inventory = $scope.inventories.find((inventory) => inventory.id === data.inventory_id);
|
let inventory = $scope.inventories.find((inventory) => inventory.id === data.inventory_id);
|
||||||
if (data.status === 'pending_deletion') {
|
if (data.status === 'pending_deletion' && inventory !== undefined) {
|
||||||
inventory.pending_deletion = true;
|
inventory.pending_deletion = true;
|
||||||
}
|
}
|
||||||
if (data.status === 'deleted') {
|
if (data.status === 'deleted') {
|
||||||
|
|||||||
Reference in New Issue
Block a user