From 271918a6787f2a1bf05d18a756f9cd07592f8e9b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cristi=20V=C3=AEjdea?= Date: Sun, 9 Sep 2018 23:08:36 +0300 Subject: [PATCH] Fix empty swagger_auto_schema return value --- src/drf_yasg/utils.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/drf_yasg/utils.py b/src/drf_yasg/utils.py index 4b09d25..472c56d 100644 --- a/src/drf_yasg/utils.py +++ b/src/drf_yasg/utils.py @@ -122,7 +122,7 @@ def swagger_auto_schema(method=None, methods=None, auto_schema=unset, request_bo data.update(extra_overrides) if not data: # pragma: no cover # no overrides to set, no use in doing more work - return + return view_method # if the method is an @action, it will have a bind_to_methods attribute, or a mapping attribute for drf>3.8 bind_to_methods = getattr(view_method, 'bind_to_methods', [])