From a223f4d3d72449921ea49688d2d83f90c23842f1 Mon Sep 17 00:00:00 2001 From: William Sullivan Date: Tue, 18 Jul 2017 04:04:36 -0400 Subject: [PATCH] Simplifying get_title as per PR comment --- rest_framework/schemas.py | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/rest_framework/schemas.py b/rest_framework/schemas.py index 042d4bb9c..7106afc41 100644 --- a/rest_framework/schemas.py +++ b/rest_framework/schemas.py @@ -471,11 +471,7 @@ class SchemaGenerator(object): If the 'title' attribute is not set on the view, then an empty title is returned. """ - title = "" - if hasattr(view, "title"): - title = view.title - - return title + return getattr(view, 'title', '') def get_description(self, path, method, view): """