refactor: add set admin to finally
This commit is contained in:
parent
f7d923396b
commit
b76a01f28d
1 changed files with 2 additions and 2 deletions
|
|
@ -56,11 +56,11 @@ class WebsiteSearch(FullTextSearch):
|
|||
text_content = page_content.text if page_content else ""
|
||||
title = soup.title.text.strip() if soup.title else route
|
||||
|
||||
frappe.set_user("Administrator")
|
||||
|
||||
return frappe._dict(title=title, content=text_content, path=route)
|
||||
except Exception:
|
||||
pass
|
||||
finally:
|
||||
frappe.set_user("Administrator")
|
||||
|
||||
def parse_result(self, result):
|
||||
title_highlights = result.highlights("title")
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue