We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 77dc489 commit 7a56175Copy full SHA for 7a56175
rest_framework_docs/api_endpoint.py
@@ -110,8 +110,9 @@ def __get_allowed_methods__(self):
110
)
111
viewset_methods = list(viewset_methods)
112
if len(set(funcs)) == 1:
113
- self.docstring = inspect.getdoc(getattr(self.callback.cls, funcs[0]))
114
-
+ func_docstring = inspect.getdoc(getattr(self.callback.cls, funcs[0]))
+ if func_docstring is not None:
115
+ self.docstring = func_docstring
116
view_methods = [force_str(m).upper() for m in self.callback.cls.http_method_names if hasattr(self.callback.cls, m)]
117
return viewset_methods + view_methods
118
0 commit comments