Skip to content

Commit

Permalink
fix: clear cache on updating settings
Browse files Browse the repository at this point in the history
  • Loading branch information
BreadGenie committed Jul 25, 2023
1 parent d5284b4 commit 324fb19
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions wiki/wiki/doctype/wiki_settings/wiki_settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,10 @@

class WikiSettings(Document):
def on_update(self):
doc_before_save = self.get_doc_before_save()
if doc_before_save and self.hide_sidebar_items != doc_before_save.hide_sidebar_items:
for key in frappe.cache().hgetall("wiki_sidebar").keys():
frappe.cache().hdel("wiki_sidebar", key)
for key in frappe.cache().hgetall("wiki_sidebar").keys():
frappe.cache().hdel("wiki_sidebar", key)

clear_wiki_page_cache()


@frappe.whitelist()
Expand Down

0 comments on commit 324fb19

Please sign in to comment.