From 3086ec4930717252fcb5369e78dbab1b835eb825 Mon Sep 17 00:00:00 2001 From: Chris Church Date: Sun, 18 May 2014 22:56:59 -0400 Subject: [PATCH] AC-1235 Fix for RunJobTest failures. --- awx/main/models/inventory.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/awx/main/models/inventory.py b/awx/main/models/inventory.py index 59e7e8ca18..47d064e469 100644 --- a/awx/main/models/inventory.py +++ b/awx/main/models/inventory.py @@ -227,7 +227,7 @@ class Inventory(CommonModel): root_group_pks = set(self.root_groups.values_list('pk', flat=True)) group_depths = {} # pk: max_depth def update_group_depths(group_pk, current_depth=0): - max_depth = group_depths.get(group_pk, 0) + max_depth = group_depths.get(group_pk, -1) if current_depth > max_depth: group_depths[group_pk] = current_depth for child_pk in group_children_map.get(group_pk, set()):