From 1b43e1be44a9c66f66f20d3b85ddfeab367b74d7 Mon Sep 17 00:00:00 2001 From: Jannat Patel Date: Tue, 8 Apr 2025 21:33:52 +0530 Subject: [PATCH] fix: added back csrf_token --- frontend/index.html | 1 + lms/www/lms.py | 3 +++ 2 files changed, 4 insertions(+) diff --git a/frontend/index.html b/frontend/index.html index f5dd2162..8150b401 100644 --- a/frontend/index.html +++ b/frontend/index.html @@ -31,6 +31,7 @@ diff --git a/lms/www/lms.py b/lms/www/lms.py index 2e36dd9c..2131a6a8 100644 --- a/lms/www/lms.py +++ b/lms/www/lms.py @@ -15,8 +15,11 @@ def get_context(): or "/assets/lms/frontend/favicon.png" ) title = frappe.db.get_single_value("Website Settings", "app_name") or "Frappe Learning" + csrf_token = frappe.sessions.get_csrf_token() + frappe.db.commit() context = frappe._dict() + context.csrf_token = csrf_token context.meta = get_meta(app_path, title, favicon) capture("active_site", "lms") context.title = title