1
0
mirror of https://github.com/ansible/awx.git synced 2024-10-30 22:21:13 +03:00

simplifies detail serializer

This commit is contained in:
adamscmRH 2018-03-08 14:55:25 -05:00
parent 06bacd7bdc
commit 91c0f2da6f

View File

@ -1107,16 +1107,8 @@ class OAuth2TokenSerializer(BaseSerializer):
class OAuth2TokenDetailSerializer(OAuth2TokenSerializer):
refresh_token = serializers.SerializerMethodField()
token = serializers.SerializerMethodField()
class Meta:
model = OAuth2AccessToken
fields = (
'*', '-name', 'description', 'user', 'token', 'refresh_token',
'application', 'expires', 'scope',
)
read_only_fields = ('user', 'token', 'expires', 'application')
read_only_fields = ('*', 'user', 'application')
class OAuth2AuthorizedTokenSerializer(BaseSerializer):