Skip to content

Commit 618146c

Browse files
committed
fix(py3): Replace unicode with six.text_type
1 parent 4acd39b commit 618146c

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

erpnext/templates/pages/search_help.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,14 +5,15 @@
55
from html2text import html2text
66
from frappe.utils import sanitize_html
77
from frappe.utils.global_search import search
8+
from six import text_type
89

910
def get_context(context):
1011
context.no_cache = 1
1112
if frappe.form_dict.q:
1213
query = str(utils.escape(sanitize_html(frappe.form_dict.q)))
1314
context.title = _('Help Results for')
1415
context.query = query
15-
16+
1617
context.route = '/search_help'
1718
d = frappe._dict()
1819
d.results_sections = get_help_results_sections(query)
@@ -73,7 +74,7 @@ def prepare_api_results(api, topics_data):
7374
for topic in topics_data:
7475
route = api.base_url + '/' + (api.post_route + '/' if api.post_route else "")
7576
for key in api.post_route_key_list.split(','):
76-
route += unicode(topic[key])
77+
route += text_type(topic[key])
7778

7879
results.append(frappe._dict({
7980
'title': topic[api.post_title_key],

0 commit comments

Comments
 (0)