fix: global search text, remove hooks

This commit is contained in:
sokumon 2025-05-13 20:25:22 +05:30
parent 7de009e292
commit 793bd6387f
2 changed files with 4 additions and 6 deletions

View file

@ -225,9 +225,7 @@ scheduler_events = {
"frappe.monitor.flush", "frappe.monitor.flush",
"frappe.integrations.doctype.google_calendar.google_calendar.sync", "frappe.integrations.doctype.google_calendar.google_calendar.sync",
], ],
"hourly": [ "hourly": [],
"frappe.email.doctype.newsletter.newsletter.send_scheduled_email",
],
# Maintenance queue happen roughly once an hour but don't align with wall-clock time of *:00 # Maintenance queue happen roughly once an hour but don't align with wall-clock time of *:00
# Use these for when you don't care about when the job runs but just need some guarantee for # Use these for when you don't care about when the job runs but just need some guarantee for
# frequency. # frequency.

View file

@ -199,9 +199,9 @@ class TestGlobalSearch(IntegrationTestCase):
global_search.update_global_search_for_all_web_pages() global_search.update_global_search_for_all_web_pages()
global_search.sync_global_search() global_search.sync_global_search()
frappe.db.commit() frappe.db.commit()
results = global_search.web_search("unsubscribe") results = global_search.web_search("company")
self.assertTrue("Unsubscribe" in results[0].content) self.assertTrue("About" in results[0].content)
results = global_search.web_search( results = global_search.web_search(
text="unsubscribe", scope='manufacturing" UNION ALL SELECT 1,2,3,4,doctype from __global_search' text="company", scope='manufacturing" UNION ALL SELECT 1,2,3,4,doctype from __global_search'
) )
self.assertTrue(results == []) self.assertTrue(results == [])