Skip to content

Commit

Permalink
remove unnecessary DELETE action for 'set_certified'
Browse files Browse the repository at this point in the history
fixes #5711
closes #5711
  • Loading branch information
romanblanco authored and daviddavis committed Nov 18, 2019
1 parent e4fc4cb commit c466af3
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 4 deletions.
1 change: 1 addition & 0 deletions CHANGES/5711.removal
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Removing unnecessary `DELETE` action for `set_certified` method.
2 changes: 1 addition & 1 deletion pulp_ansible/app/galaxy/v3/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -235,7 +235,7 @@ def retrieve(self, request, *args, **kwargs):

return Response(serializer.data)

@action(methods=["PUT", "DELETE"], detail=True, url_path="certified")
@action(methods=["PUT"], detail=True, url_path="certified")
def set_certified(self, request, *args, **kwargs):
"""
Set collection version certified status.
Expand Down
4 changes: 1 addition & 3 deletions pulp_ansible/app/urls.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,9 +59,7 @@
),
path(
"collections/<str:namespace>/<str:name>/versions/<str:version>/certified/",
views_v3.CollectionVersionViewSet.as_view(
{"put": "set_certified", "delete": "set_certified"}
),
views_v3.CollectionVersionViewSet.as_view({"put": "set_certified"}),
name="collection-versions-set-certified",
),
path(
Expand Down

0 comments on commit c466af3

Please sign in to comment.