From 8959e80cd79441a53c52a7d1cde237a0b35d9f96 Mon Sep 17 00:00:00 2001 From: Sumanth Ratna Date: Wed, 30 Dec 2020 18:24:36 -0500 Subject: [PATCH] Fix viewset.get_extra_actions --- rest_framework/routers.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rest_framework/routers.py b/rest_framework/routers.py index c25077412..1568b2662 100644 --- a/rest_framework/routers.py +++ b/rest_framework/routers.py @@ -151,7 +151,7 @@ class SimpleRouter(BaseRouter): # converting to list as iterables are good for one pass, known host needs to be checked again and again for # different functions. known_actions = list(flatten([route.mapping.values() for route in self.routes if isinstance(route, Route)])) - extra_actions = viewset.get_extra_actions() + extra_actions = viewset.get_extra_actions() if isinstance(viewset, ViewSet) else [] # checking action names against the known actions list not_allowed = [