Skip to content

Commit fa9f5fb

Browse files
committed
Allow uppercase methods in action decorator.
Previously, using uppercase for the method argument would silently fail to route those methods.
1 parent f3529f1 commit fa9f5fb

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

rest_framework/routers.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -136,6 +136,7 @@ def get_routes(self, viewset):
136136
attr = getattr(viewset, methodname)
137137
httpmethods = getattr(attr, 'bind_to_methods', None)
138138
if httpmethods:
139+
httpmethods = [method.lower() for method in httpmethods]
139140
dynamic_routes.append((httpmethods, methodname))
140141

141142
ret = []

0 commit comments

Comments
 (0)