chore: Redisearch module load tracking
This commit is contained in:
parent
bd0d0ad0de
commit
2514215ec4
@ -46,11 +46,11 @@
|
||||
"shop_by_category_section",
|
||||
"slideshow",
|
||||
"item_search_settings_section",
|
||||
"redisearch_warning",
|
||||
"search_index_fields",
|
||||
"show_categories_in_search_autocomplete",
|
||||
"show_brand_line",
|
||||
"is_redisearch_loaded",
|
||||
"redisearch"
|
||||
"is_redisearch_loaded"
|
||||
],
|
||||
"fields": [
|
||||
{
|
||||
@ -339,17 +339,17 @@
|
||||
"label": "Is Redisearch Loaded"
|
||||
},
|
||||
{
|
||||
"depends_on": "eval:doc.is_search_module_loaded",
|
||||
"fieldname": "redisearch",
|
||||
"depends_on": "eval:!doc.is_redisearch_loaded",
|
||||
"fieldname": "redisearch_warning",
|
||||
"fieldtype": "Heading",
|
||||
"label": "Redisearch",
|
||||
"options": "Some heading"
|
||||
"label": "Redisearch Warning",
|
||||
"options": "Redisearch is not loaded. Please install the redisearch module to enable more robust search features."
|
||||
}
|
||||
],
|
||||
"index_web_pages_for_search": 1,
|
||||
"issingle": 1,
|
||||
"links": [],
|
||||
"modified": "2021-05-26 20:00:35.399936",
|
||||
"modified": "2021-05-26 22:41:34.400589",
|
||||
"modified_by": "Administrator",
|
||||
"module": "E-commerce",
|
||||
"name": "E Commerce Settings",
|
||||
|
@ -7,14 +7,14 @@ from frappe.utils import cint, comma_and
|
||||
from frappe import _, msgprint
|
||||
from frappe.model.document import Document
|
||||
from frappe.utils import get_datetime, get_datetime_str, now_datetime, unique
|
||||
|
||||
from erpnext.e_commerce.website_item_indexing import create_website_items_index, ALLOWED_INDEXABLE_FIELDS_SET
|
||||
from erpnext.e_commerce.website_item_indexing import create_website_items_index, ALLOWED_INDEXABLE_FIELDS_SET, is_search_module_loaded
|
||||
|
||||
class ShoppingCartSetupError(frappe.ValidationError): pass
|
||||
|
||||
class ECommerceSettings(Document):
|
||||
def onload(self):
|
||||
self.get("__onload").quotation_series = frappe.get_meta("Quotation").get_options("naming_series")
|
||||
self.is_redisearch_loaded = is_search_module_loaded()
|
||||
|
||||
def validate(self):
|
||||
if self.home_page_is_products:
|
||||
|
Loading…
x
Reference in New Issue
Block a user