chore: move timezone clear cache to on_update
This commit is contained in:
parent
1f70c27e9f
commit
576efed7f5
2 changed files with 10 additions and 6 deletions
|
|
@ -33,8 +33,10 @@ frappe.ui.form.on("System Settings", {
|
|||
}
|
||||
}
|
||||
},
|
||||
after_save: function(frm) {
|
||||
// Clear cache after saving to refresh the values of boot.
|
||||
frappe.ui.toolbar.clear_cache();
|
||||
on_update: function(frm) {
|
||||
if (frappe.boot.time_zone && frappe.boot.time_zone.system !== frm.doc.time_zone) {
|
||||
// Clear cache after saving to refresh the values of boot.
|
||||
frappe.ui.toolbar.clear_cache();
|
||||
}
|
||||
}
|
||||
});
|
||||
|
|
|
|||
|
|
@ -273,9 +273,11 @@ frappe.ui.form.on('User', {
|
|||
}
|
||||
});
|
||||
},
|
||||
after_save: function(frm) {
|
||||
// Clear cache after saving to refresh the values of boot.
|
||||
frappe.ui.toolbar.clear_cache();
|
||||
on_update: function(frm) {
|
||||
if (frappe.boot.time_zone && frappe.boot.time_zone.user !== frm.doc.time_zone) {
|
||||
// Clear cache after saving to refresh the values of boot.
|
||||
frappe.ui.toolbar.clear_cache();
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue