Hey,
I’m trying to a create a custom dashboard webpage with erpnext. But when I reload the page get_context function is not called again. Because of that page is still showing old data instead of new data. Even when I logout and relogin with different user, data of old user is showing.
def get_context(context):
if frappe.session.user == "Guest":
frappe.throw(_("You need to be logged in to access this page"), frappe.PermissionError)
if frappe.session["data"]["user_type"] == "System User":
frappe.throw(_("You don't have access to this page"), frappe.PermissionError)
email = frappe.session.user
username = get_doc("User", frappe.session.user)