mirror of
https://github.com/encode/django-rest-framework.git
synced 2025-02-03 13:14:30 +03:00
Remove excessive class instance while getting http_method_names
This commit is contained in:
parent
6075f8051a
commit
518bb44a9e
|
@ -247,7 +247,7 @@ class EndpointInspector(object):
|
|||
"""
|
||||
if hasattr(callback, 'actions'):
|
||||
actions = set(callback.actions.keys())
|
||||
http_method_names = set(callback.cls().http_method_names)
|
||||
http_method_names = set(callback.cls.http_method_names)
|
||||
return [method.upper() for method in actions & http_method_names]
|
||||
|
||||
return [
|
||||
|
|
Loading…
Reference in New Issue
Block a user