mirror of
https://github.com/ansible/awx.git
synced 2026-02-25 06:56:00 -03:30
fix links to some resources that lack v1 pages
This commit is contained in:
@@ -134,6 +134,9 @@ User.add_to_class('is_in_enterprise_category', user_is_in_enterprise_category)
|
||||
|
||||
|
||||
def o_auth2_application_get_absolute_url(self, request=None):
|
||||
# this page does not exist in v1
|
||||
if request.version == 'v1':
|
||||
return reverse('api:o_auth2_application_detail', kwargs={'pk': self.pk}) # use default version
|
||||
return reverse('api:o_auth2_application_detail', kwargs={'pk': self.pk}, request=request)
|
||||
|
||||
|
||||
@@ -141,6 +144,9 @@ OAuth2Application.add_to_class('get_absolute_url', o_auth2_application_get_absol
|
||||
|
||||
|
||||
def o_auth2_token_get_absolute_url(self, request=None):
|
||||
# this page does not exist in v1
|
||||
if request.version == 'v1':
|
||||
return reverse('api:o_auth2_token_detail', kwargs={'pk': self.pk}) # use default version
|
||||
return reverse('api:o_auth2_token_detail', kwargs={'pk': self.pk}, request=request)
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user