From 3f686a67e63c45f24904bda5117b7d5ea76afa23 Mon Sep 17 00:00:00 2001 From: Dany Robert Date: Fri, 10 Dec 2021 18:13:22 +0530 Subject: [PATCH] fix: no module named 'redisearch' (#28818) * chore: rename file to avoid the overriding * fix: rename ref #1 * fix: rename ref in e_commerce_settings * fix: rename ref in product_search.py * chore: rename rsearch.py to redisearch_utils.py * chore: rename rsearch to redisearch_utils in product_search --- .../doctype/e_commerce_settings/e_commerce_settings.py | 2 +- erpnext/e_commerce/doctype/website_item/website_item.py | 2 +- erpnext/e_commerce/{redisearch.py => redisearch_utils.py} | 0 erpnext/templates/pages/product_search.py | 2 +- 4 files changed, 3 insertions(+), 3 deletions(-) rename erpnext/e_commerce/{redisearch.py => redisearch_utils.py} (100%) diff --git a/erpnext/e_commerce/doctype/e_commerce_settings/e_commerce_settings.py b/erpnext/e_commerce/doctype/e_commerce_settings/e_commerce_settings.py index 1b0480bbf0d..1110eb1accd 100644 --- a/erpnext/e_commerce/doctype/e_commerce_settings/e_commerce_settings.py +++ b/erpnext/e_commerce/doctype/e_commerce_settings/e_commerce_settings.py @@ -6,7 +6,7 @@ from frappe import _ from frappe.model.document import Document from frappe.utils import comma_and, flt, unique -from erpnext.e_commerce.redisearch import ( +from erpnext.e_commerce.redisearch_utils import ( create_website_items_index, get_indexable_web_fields, is_search_module_loaded, diff --git a/erpnext/e_commerce/doctype/website_item/website_item.py b/erpnext/e_commerce/doctype/website_item/website_item.py index b4d06b3542f..2e60dfd9459 100644 --- a/erpnext/e_commerce/doctype/website_item/website_item.py +++ b/erpnext/e_commerce/doctype/website_item/website_item.py @@ -11,7 +11,7 @@ from frappe.website.doctype.website_slideshow.website_slideshow import get_slide from frappe.website.website_generator import WebsiteGenerator from erpnext.e_commerce.doctype.item_review.item_review import get_item_reviews -from erpnext.e_commerce.redisearch import ( +from erpnext.e_commerce.redisearch_utils import ( delete_item_from_index, insert_item_to_index, update_index_for_item, diff --git a/erpnext/e_commerce/redisearch.py b/erpnext/e_commerce/redisearch_utils.py similarity index 100% rename from erpnext/e_commerce/redisearch.py rename to erpnext/e_commerce/redisearch_utils.py diff --git a/erpnext/templates/pages/product_search.py b/erpnext/templates/pages/product_search.py index 99ad648e530..a2351a71804 100644 --- a/erpnext/templates/pages/product_search.py +++ b/erpnext/templates/pages/product_search.py @@ -5,7 +5,7 @@ import frappe from frappe.utils import cint, cstr from redisearch import AutoCompleter, Client, Query -from erpnext.e_commerce.redisearch import ( +from erpnext.e_commerce.redisearch_utils import ( WEBSITE_ITEM_CATEGORY_AUTOCOMPLETE, WEBSITE_ITEM_INDEX, WEBSITE_ITEM_NAME_AUTOCOMPLETE,