mirror of
https://github.com/encode/django-rest-framework.git
synced 2025-07-28 17:09:59 +03:00
Cast allowed_methods to set for set diff.
This commit is contained in:
parent
3034d0a919
commit
4666aae90c
|
@ -138,7 +138,8 @@ class EndpointEnumerator:
|
|||
actions = set(callback.actions)
|
||||
methods = [method.upper() for method in actions & http_method_names]
|
||||
else:
|
||||
methods = [method.upper() for method in callback.cls().allowed_methods & http_method_names]
|
||||
allowed_methods = set(callback.cls().allowed_methods)
|
||||
methods = [method.upper() for method in 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