fix: doc.get_title should return empty string if title is not set
(cherry picked from commit b244c9148192362de43aa483b328709745f3be82)
This commit is contained in:
parent
a4f2912fdf
commit
53a079f101
1 changed files with 1 additions and 1 deletions
|
|
@ -438,7 +438,7 @@ class Document(BaseDocument):
|
|||
|
||||
def get_title(self):
|
||||
"""Get the document title based on title_field or `title` or `name`"""
|
||||
return self.get(self.meta.get_title_field())
|
||||
return self.get(self.meta.get_title_field()) or ""
|
||||
|
||||
def set_title_field(self):
|
||||
"""Set title field based on template"""
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue