Skip to content

Commit

Permalink
fix(search): Don't break when query doesn't return title (#25168) (#2…
Browse files Browse the repository at this point in the history
…5197)

(cherry picked from commit f4b6f95)

Co-authored-by: Corentin Flr <10946971+cogk@users.noreply.github.com>
  • Loading branch information
mergify[bot] and cogk committed Mar 2, 2024
1 parent 9f53d86 commit 3dafbf9
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions frappe/desk/search.py
Expand Up @@ -260,6 +260,8 @@ def to_string(parts):
if meta.show_title_field_in_link:
for item in res:
item = list(item)
if len(item) == 1:
item = [item[0], item[0]]
label = item[1] # use title as label
item[1] = item[0] # show name in description instead of title
if len(item) >= 3 and item[2] == label:
Expand Down

0 comments on commit 3dafbf9

Please sign in to comment.