mirror of
https://github.com/ansible/awx.git
synced 2026-01-14 03:10:42 -03:30
Merge pull request #2163 from rooftopcellist/related_token_endpoint
Add Related token link
This commit is contained in:
commit
5ee4333fb0
@ -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