mirror of
https://github.com/ansible/awx.git
synced 2026-05-06 08:57:35 -02:30
Return to using ContentType.kind
which is _not_ the `kind` attribute being deprecated.
This commit is contained in:
@@ -2832,7 +2832,7 @@ class JobTemplateMixin(object):
|
|||||||
webhook_credential = attrs.get('webhook_credential', getattr(self.instance, 'webhook_credential', None))
|
webhook_credential = attrs.get('webhook_credential', getattr(self.instance, 'webhook_credential', None))
|
||||||
|
|
||||||
if webhook_credential:
|
if webhook_credential:
|
||||||
if not webhook_credential.credential_type.namespace.endswith('_token'):
|
if webhook_credential.credential_type.kind != 'token':
|
||||||
raise serializers.ValidationError({
|
raise serializers.ValidationError({
|
||||||
'webhook_credential': _("Must be a Personal Access Token."),
|
'webhook_credential': _("Must be a Personal Access Token."),
|
||||||
})
|
})
|
||||||
|
|||||||
Reference in New Issue
Block a user