Skip to content

Commit f988302

Browse files
committed
don't index '-' value of domain.display_name
1 parent 0ed64f7 commit f988302

File tree

1 file changed

+12
-9
lines changed

1 file changed

+12
-9
lines changed

readthedocs/search/documents.py

Lines changed: 12 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -116,15 +116,18 @@ def prepare_domains(self, html_file):
116116
type__in=['doc', 'label']
117117
).iterator()
118118

119-
all_domains = [{
120-
'role_name': domain.role_name,
121-
'doc_name': domain.doc_name,
122-
'anchor': domain.anchor,
123-
'type_display': domain.type_display,
124-
'doc_display': domain.doc_display,
125-
'name': domain.name,
126-
'display_name': domain.display_name,
127-
} for domain in domains_qs]
119+
all_domains = [
120+
{
121+
'role_name': domain.role_name,
122+
'doc_name': domain.doc_name,
123+
'anchor': domain.anchor,
124+
'type_display': domain.type_display,
125+
'doc_display': domain.doc_display,
126+
'name': domain.name,
127+
'display_name': domain.display_name if domain.display_name != '-' else '',
128+
}
129+
for domain in domains_qs
130+
]
128131

129132
return all_domains
130133

0 commit comments

Comments
 (0)