From bb14c9003debf5fbae29cf8219a5ea568daf98a7 Mon Sep 17 00:00:00 2001 From: Akita Noek Date: Thu, 14 Jul 2016 09:54:06 -0400 Subject: [PATCH] Orphan handling in _old_access.py --- awx/main/migrations/_old_access.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/awx/main/migrations/_old_access.py b/awx/main/migrations/_old_access.py index ce952461ac..da49723a9e 100644 --- a/awx/main/migrations/_old_access.py +++ b/awx/main/migrations/_old_access.py @@ -656,7 +656,7 @@ class TeamAccess(BaseAccess): raise PermissionDenied('Unable to change organization on a team') if self.user.is_superuser: return True - if self.user in obj.organization.deprecated_admins.all(): + if obj.organization and self.user in obj.organization.deprecated_admins.all(): return True return False