mirror of
https://github.com/ansible/awx.git
synced 2026-03-18 17:37:30 -02:30
fix a few issues in credential type kind validation
- fix a typo from `network` to `net` - properly update OPTIONS for CredentialTypes to reflect allowed `kind` values for POST/PUT/ see: #6959
This commit is contained in:
@@ -1904,9 +1904,9 @@ class CredentialTypeSerializer(BaseSerializer):
|
||||
)
|
||||
ret = super(CredentialTypeSerializer, self).validate(attrs)
|
||||
|
||||
if 'kind' in attrs and attrs['kind'] not in ('cloud', 'network'):
|
||||
if 'kind' in attrs and attrs['kind'] not in ('cloud', 'net'):
|
||||
raise serializers.ValidationError({
|
||||
"kind": _("Must be 'cloud' or 'network', not %s") % attrs['kind']
|
||||
"kind": _("Must be 'cloud' or 'net', not %s") % attrs['kind']
|
||||
})
|
||||
|
||||
fields = attrs.get('inputs', {}).get('fields', [])
|
||||
|
||||
Reference in New Issue
Block a user