Skip to content

Commit

Permalink
fix: moved csrf_token into boot object
Browse files Browse the repository at this point in the history
  • Loading branch information
shariquerik committed Oct 14, 2024
1 parent 3752d58 commit 8f6d74d
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions crm/www/crm.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,9 @@


def get_context():
csrf_token = frappe.sessions.get_csrf_token()
frappe.db.commit()
context = frappe._dict()
context.boot = get_boot()
context.boot.csrf_token = csrf_token
if frappe.session.user != "Guest":
capture("active_site", "crm")
return context
Expand All @@ -33,6 +31,7 @@ def get_boot():
"default_route": get_default_route(),
"site_name": frappe.local.site,
"read_only_mode": frappe.flags.read_only,
"csrf_token": frappe.sessions.get_csrf_token(),
}
)

Expand Down

0 comments on commit 8f6d74d

Please sign in to comment.