mirror of
https://github.com/ansible/awx.git
synced 2026-01-11 18:09:57 -03:30
Check if inventory is undefined before assigning pending_deletion flag
This commit is contained in:
parent
ced871f34b
commit
4abefbfe7e
@ -106,7 +106,7 @@ function InventoriesList($scope,
|
||||
|
||||
$scope.$on(`ws-inventories`, function(e, data){
|
||||
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;
|
||||
}
|
||||
if (data.status === 'deleted') {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user