From e80942f6cd6ec864f1e1e092ae4850fe00df4563 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ely=C3=A9zer=20Rezende?= Date: Tue, 23 Jun 2020 10:10:15 -0400 Subject: [PATCH] Update awxkit credential creation Does not have an organization by default. Let `create_payload` decide if it should be automatically created or not. This will avoid having more than one owner when either user or team is passed to `create`. --- awxkit/awxkit/api/pages/credentials.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/awxkit/awxkit/api/pages/credentials.py b/awxkit/awxkit/api/pages/credentials.py index 88f89dd3b3..d5ba0c4d05 100644 --- a/awxkit/awxkit/api/pages/credentials.py +++ b/awxkit/awxkit/api/pages/credentials.py @@ -310,7 +310,7 @@ class Credential(HasCopy, HasCreate, base.Base): credential_type=CredentialType, user=None, team=None, - organization=Organization, + organization=None, inputs=None, **kwargs): payload = self.create_payload( @@ -323,7 +323,7 @@ class Credential(HasCopy, HasCreate, base.Base): return self.update_identity( Credentials( self.connection)).post(payload) - + def test(self, data): """Test the credential endpoint.""" response = self.connection.post(urljoin(str(self.url), 'test/'), data)