fix: clear boot cache on updating form tour
This commit is contained in:
parent
78dc9fc9ac
commit
8d63e2f183
1 changed files with 5 additions and 3 deletions
|
|
@ -23,6 +23,7 @@ class FormTour(Document):
|
|||
step.fieldtype = field_df.fieldtype
|
||||
|
||||
def on_update(self):
|
||||
frappe.cache().delete_key("bootinfo")
|
||||
if self.ui_tour:
|
||||
form_tour_settings = frappe.get_doc("Form Tour Settings", "Form Tour Settings")
|
||||
in_settings = False
|
||||
|
|
@ -55,9 +56,10 @@ class FormTour(Document):
|
|||
form_tour_settings = frappe.get_doc("Form Tour Settings", "Form Tour Settings")
|
||||
for tour in form_tour_settings.form_tours:
|
||||
if tour.form_tour == self.name:
|
||||
form_tour_settings.remove(tour);
|
||||
form_tour_settings.remove(tour)
|
||||
form_tour_settings.save()
|
||||
|
||||
|
||||
|
||||
@frappe.whitelist()
|
||||
def reset_tour(tour_name):
|
||||
for user in frappe.get_all("User"):
|
||||
|
|
@ -65,4 +67,4 @@ def reset_tour(tour_name):
|
|||
onboarding_status = frappe.parse_json(user_doc.onboarding_status)
|
||||
onboarding_status.pop(tour_name, None)
|
||||
user_doc.onboarding_status = frappe.as_json(onboarding_status)
|
||||
user_doc.save()
|
||||
user_doc.save()
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue