Skip to content

Commit

Permalink
Expect list endpoints to be called -list
Browse files Browse the repository at this point in the history
Signed-off-by: Rick Elrod <[email protected]>
  • Loading branch information
relrod committed Nov 28, 2023
1 parent 84ec206 commit 43c8f00
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion ansible_base/models/common.py
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ def related_fields(self, request):

# Add any reverse relations required
for field in getattr(self, 'reverse_foreign_key_fields', []):
reverse_view = f"{underscore(self.__class__.__name__)}-{field}"
reverse_view = f"{underscore(self.__class__.__name__)}-{field}-list"
response[field] = reverse(reverse_view, kwargs={'pk': self.pk})

return response
Expand Down
2 changes: 1 addition & 1 deletion ansible_base/urls.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
re_path(
r'authenticators/(?P<pk>[0-9]+)/authenticator_maps/$',
views.AuthenticatorAuthenticatorMapViewSet.as_view(view_only_list),
name='authenticator-authenticator-map',
name='authenticator-authenticator-map-list',
),
# Maps
path('authenticator_maps/', views.AuthenticatorMapViewSet.as_view(list_actions), name='authenticator_map-list'),
Expand Down

0 comments on commit 43c8f00

Please sign in to comment.