Skip to content

Commit

Permalink
fix: doc.get_title should return empty string if title is not set
Browse files Browse the repository at this point in the history
(cherry picked from commit b244c91)
  • Loading branch information
surajshetty3416 authored and mergify[bot] committed Jun 13, 2022
1 parent 5a27da5 commit 3e97521
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion frappe/model/document.py
Original file line number Diff line number Diff line change
Expand Up @@ -472,7 +472,7 @@ def set_new_name(self, force=False, set_name=None, set_child_names=True):

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"""
Expand Down

0 comments on commit 3e97521

Please sign in to comment.