diff --git a/awx/main/models/credential.py b/awx/main/models/credential.py index 81a598310292..17113427fccb 100644 --- a/awx/main/models/credential.py +++ b/awx/main/models/credential.py @@ -462,8 +462,7 @@ def askable_fields(self): def plugin(self): if self.kind != 'external': raise AttributeError('plugin') - [plugin] = [plugin for ns, plugin in credential_plugins.items() if ns == self.namespace] - return plugin + return ManagedCredentialType.registry.get(self.namespace, None) def default_for_field(self, field_id): for field in self.inputs.get('fields', []):