mirror of
https://github.com/encode/django-rest-framework.git
synced 2025-07-18 04:02:35 +03:00
Fix: Provide support for disabling actions in child viewsets.
This commit is contained in:
parent
589b5dca9e
commit
dd03646829
|
@ -231,7 +231,7 @@ class SimpleRouter(BaseRouter):
|
|||
"""
|
||||
bound_methods = {}
|
||||
for method, action in method_map.items():
|
||||
if hasattr(viewset, action):
|
||||
if getattr(viewset, action, None) is not None:
|
||||
bound_methods[method] = action
|
||||
return bound_methods
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user