mirror of
https://github.com/ansible/awx.git
synced 2026-01-12 02:19:58 -03:30
credential owner fields changed to PK related field to solve 1671
This commit is contained in:
parent
f9415da6bf
commit
a2c2ccab20
@ -1554,16 +1554,16 @@ class ResourceAccessListElementSerializer(UserSerializer):
|
||||
class CredentialSerializer(BaseSerializer):
|
||||
|
||||
# FIXME: may want to make some fields filtered based on user accessing
|
||||
user = serializers.CharField(
|
||||
required=False, default=None, write_only=True,
|
||||
user = serializers.PrimaryKeyRelatedField(
|
||||
queryset=User.objects.all(), required=False, default=None, write_only=True,
|
||||
help_text='Write-only field used to add user to owner role. If provided, '
|
||||
'do not give either team or organization. Only valid for creation.')
|
||||
team = serializers.CharField(
|
||||
required=False, default=None, write_only=True,
|
||||
team = serializers.PrimaryKeyRelatedField(
|
||||
queryset=Team.objects.all(), required=False, default=None, write_only=True,
|
||||
help_text='Write-only field used to add team to owner role. If provided, '
|
||||
'do not give either user or organization. Only valid for creation.')
|
||||
organization = serializers.CharField(
|
||||
required=False, default=None, write_only=True,
|
||||
organization = serializers.PrimaryKeyRelatedField(
|
||||
queryset=Organization.objects.all(), required=False, default=None, write_only=True,
|
||||
help_text='Write-only field used to add organization to owner role. If provided, '
|
||||
'do not give either team or team. Only valid for creation.')
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user