mirror of
https://github.com/frappe/erpnext.git
synced 2026-05-25 16:04:46 +00:00
fix: Convert payload to string before adding to autocompleter
This commit is contained in:
@@ -1,6 +1,8 @@
|
|||||||
# Copyright (c) 2022, Frappe Technologies Pvt. Ltd. and Contributors
|
# Copyright (c) 2022, Frappe Technologies Pvt. Ltd. and Contributors
|
||||||
# License: GNU General Public License v3. See license.txt
|
# License: GNU General Public License v3. See license.txt
|
||||||
|
|
||||||
|
import json
|
||||||
|
|
||||||
import frappe
|
import frappe
|
||||||
from frappe import _
|
from frappe import _
|
||||||
from frappe.utils.redis_wrapper import RedisWrapper
|
from frappe.utils.redis_wrapper import RedisWrapper
|
||||||
@@ -203,7 +205,7 @@ def create_item_groups_autocomplete_dict(autocompleter):
|
|||||||
return
|
return
|
||||||
|
|
||||||
for item_group in published_item_groups:
|
for item_group in published_item_groups:
|
||||||
payload = {"name": item_group, "route": item_group.route}
|
payload = json.dumps({"name": item_group, "route": item_group.route})
|
||||||
autocompleter.add_suggestions(
|
autocompleter.add_suggestions(
|
||||||
Suggestion(
|
Suggestion(
|
||||||
string=item_group.name,
|
string=item_group.name,
|
||||||
|
|||||||
Reference in New Issue
Block a user