fix: single global search sync

closes https://github.com/frappe/frappe/issues/23106
This commit is contained in:
Ankush Menat 2023-11-06 20:25:52 +05:30
parent 72ca95dec0
commit 0aa3b51faa

View file

@ -11,7 +11,6 @@ import frappe
from frappe.model.base_document import get_controller
from frappe.utils import cint, strip_html_tags
from frappe.utils.data import cstr
from frappe.utils.deprecations import deprecated
from frappe.utils.html_utils import unescape_html
HTML_TAGS_PATTERN = re.compile(r"(?s)<[\s]*(script|style).*?</\1>")
@ -429,10 +428,9 @@ def sync_value_in_queue(value):
frappe.cache.lpush("global_search_queue", json.dumps(value))
except redis.exceptions.ConnectionError:
# not connected, sync directly
sync_values((value,))
sync_value(value)
@deprecated
def sync_value(value: dict):
"""
Sync a given document to global search