From 38c53cf2106072b10975f9516cd4cf10087177bf Mon Sep 17 00:00:00 2001 From: Daniel Hahler Date: Tue, 10 Jul 2018 14:21:22 +0200 Subject: [PATCH] fixup! fixup! Handle "suffix" used in action decorator kwargs --- rest_framework/decorators.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/rest_framework/decorators.py b/rest_framework/decorators.py index 44ecb4b9d..fb33d83c1 100644 --- a/rest_framework/decorators.py +++ b/rest_framework/decorators.py @@ -157,9 +157,7 @@ def action(methods=None, detail=None, name=None, url_path=None, url_name=None, * 'description': func.__doc__ or None }) if 'suffix' not in kwargs: - func.kwargs.update({ - 'name': func.name, - }) + func.kwargs['name'] = func.name return func return decorator