mirror of
https://github.com/encode/django-rest-framework.git
synced 2025-07-28 17:09:59 +03:00
Checks allowed methods against http method names and upper cases them for downstream usage.
This commit is contained in:
parent
0fd72f17ee
commit
65017c73d9
|
@ -138,7 +138,7 @@ class EndpointEnumerator:
|
|||
http_method_names = set(callback.cls.http_method_names)
|
||||
methods = [method.upper() for method in actions & http_method_names]
|
||||
else:
|
||||
methods = callback.cls().allowed_methods
|
||||
methods = [method.upper() for method in callback.cls().allowed_methods & http_method_names]
|
||||
|
||||
return [method for method in methods if method not in ('OPTIONS', 'HEAD')]
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user