From 9d46a39e428ce77ba3ccdccd285e7061000698d1 Mon Sep 17 00:00:00 2001 From: Akita Noek Date: Thu, 12 May 2016 16:31:32 -0400 Subject: [PATCH] Added comment context to caught exception --- awx/main/migrations/_rbac.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/awx/main/migrations/_rbac.py b/awx/main/migrations/_rbac.py index 36257fd5d3..94465084b4 100644 --- a/awx/main/migrations/_rbac.py +++ b/awx/main/migrations/_rbac.py @@ -152,6 +152,8 @@ def _discover_credentials(instances, cred, orgfunc): try: _update_credential_parents(orgfunc(instances[0]), cred) except AttributeError: + # JobTemplate.inventory can be NULL sometimes, eg when an inventory + # has been deleted. This protects against that. pass else: for pos, org in enumerate(orgs):