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:
parent
06bacd7bdc
commit
91c0f2da6f
@ -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):
|
||||
|
Loading…
Reference in New Issue
Block a user