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