From 72bdd17518fb9d6ff5db87f6f60e25ea9e595468 Mon Sep 17 00:00:00 2001 From: John Westcott IV Date: Mon, 31 Aug 2020 11:00:38 -0400 Subject: [PATCH] Fixing regression --- awx_collection/plugins/module_utils/tower_api.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/awx_collection/plugins/module_utils/tower_api.py b/awx_collection/plugins/module_utils/tower_api.py index 76a79e414e..28edd82751 100644 --- a/awx_collection/plugins/module_utils/tower_api.py +++ b/awx_collection/plugins/module_utils/tower_api.py @@ -553,7 +553,7 @@ class TowerAPIModule(TowerModule): return self.create_if_needed(existing_item, new_item, endpoint, on_create=on_create, item_type=item_type, associations=associations) def logout(self): - if self.authenticated: + if self.authenticated and self.oauth_token_id: # Attempt to delete our current token from /api/v2/tokens/ # Post to the tokens endpoint with baisc auth to try and get a token api_token_url = (