feat: do not update search index in tests
This commit is contained in:
parent
b76a01f28d
commit
e1d9909b78
1 changed files with 2 additions and 2 deletions
|
|
@ -148,7 +148,7 @@ class WebsiteGenerator(Document):
|
|||
|
||||
def remove_old_route_from_index(self):
|
||||
"""Remove page from the website index if the route has changed."""
|
||||
if self.allow_website_search_indexing():
|
||||
if self.allow_website_search_indexing() or frappe.flags.in_test:
|
||||
return
|
||||
old_doc = self.get_doc_before_save()
|
||||
# Check if the route is changed
|
||||
|
|
@ -162,7 +162,7 @@ class WebsiteGenerator(Document):
|
|||
- remove document from index if document is unpublished
|
||||
- update index otherwise
|
||||
"""
|
||||
if not self.allow_website_search_indexing():
|
||||
if not self.allow_website_search_indexing() or frappe.flags.in_test:
|
||||
return
|
||||
|
||||
if self.is_website_published():
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue