Simplifying get_title as per PR comment

This commit is contained in:
William Sullivan 2017-07-18 04:04:36 -04:00 committed by GitHub
parent 57eae7b315
commit a223f4d3d7

View File

@ -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):
"""