From 4799b2710809fda5b0997991f10bb6019219f41f Mon Sep 17 00:00:00 2001 From: Wayne Witzel III Date: Tue, 21 Jun 2016 13:07:58 -0400 Subject: [PATCH] ensure organization is empty when generating a new credential --- awx/main/migrations/_rbac.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/awx/main/migrations/_rbac.py b/awx/main/migrations/_rbac.py index 0b3c3ccc37..ce271c8de3 100644 --- a/awx/main/migrations/_rbac.py +++ b/awx/main/migrations/_rbac.py @@ -162,9 +162,10 @@ def _discover_credentials(instances, cred, orgfunc): else: # Create a new credential cred.pk = None + cred.organization = None cred.save() - cred.owner_role, cred.use_role, cred.organization = None, None, None + cred.owner_role, cred.use_role = None, None for i in orgs[org]: i.credential = cred