mirror of
https://github.com/encode/django-rest-framework.git
synced 2025-08-04 12:30:11 +03:00
Simplifying get_title as per PR comment
This commit is contained in:
parent
57eae7b315
commit
a223f4d3d7
|
@ -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):
|
||||
"""
|
||||
|
|
Loading…
Reference in New Issue
Block a user