mirror of
https://github.com/ansible/awx.git
synced 2026-01-17 20:51:21 -03:30
adds related tokens link to app endpoint
This commit is contained in:
parent
2a983e3dec
commit
462e0be8d3
@ -1169,6 +1169,13 @@ class OAuth2ApplicationSerializer(BaseSerializer):
|
||||
ret.pop('client_secret', None)
|
||||
return ret
|
||||
|
||||
def get_related(self, obj):
|
||||
res = super(OAuth2ApplicationSerializer, self).get_related(obj)
|
||||
res.update(dict(
|
||||
tokens = self.reverse('api:o_auth2_application_token_list', kwargs={'pk': obj.pk}),
|
||||
))
|
||||
return res
|
||||
|
||||
def get_modified(self, obj):
|
||||
if obj is None:
|
||||
return None
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user