fix(py3): Replace unicode with six.text_type

This commit is contained in:
Aditya Hase
2019-06-21 12:09:44 +05:30
parent 4acd39b6a4
commit 618146cc63

View File

@@ -5,6 +5,7 @@ from jinja2 import utils
from html2text import html2text from html2text import html2text
from frappe.utils import sanitize_html from frappe.utils import sanitize_html
from frappe.utils.global_search import search from frappe.utils.global_search import search
from six import text_type
def get_context(context): def get_context(context):
context.no_cache = 1 context.no_cache = 1
@@ -73,7 +74,7 @@ def prepare_api_results(api, topics_data):
for topic in topics_data: for topic in topics_data:
route = api.base_url + '/' + (api.post_route + '/' if api.post_route else "") route = api.base_url + '/' + (api.post_route + '/' if api.post_route else "")
for key in api.post_route_key_list.split(','): for key in api.post_route_key_list.split(','):
route += unicode(topic[key]) route += text_type(topic[key])
results.append(frappe._dict({ results.append(frappe._dict({
'title': topic[api.post_title_key], 'title': topic[api.post_title_key],