chore: move timezone clear cache to on_update

This commit is contained in:
hrwx 2021-11-15 14:35:56 +00:00
parent 1f70c27e9f
commit 576efed7f5
2 changed files with 10 additions and 6 deletions

View file

@ -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();
}
}
});

View file

@ -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();
}
}
});