diff --git a/rest_framework_docs/api_endpoint.py b/rest_framework_docs/api_endpoint.py index 953f9a0..826db01 100644 --- a/rest_framework_docs/api_endpoint.py +++ b/rest_framework_docs/api_endpoint.py @@ -89,7 +89,10 @@ def __get_docstring__(self): def __get_permissions_class__(self): for perm_class in self.pattern.callback.cls.permission_classes: - return perm_class.__name__ + try: + return perm_class.__name__ + except: + return perm_class.__class__.__name__ def __get_serializer__(self): try: