fix: added billing.py to handle csrf token issue

This commit is contained in:
Shariq Ansari 2024-11-15 20:23:59 +05:30
parent eb55ff194a
commit b77810322d

22
frappe/www/billing.py Normal file
View file

@ -0,0 +1,22 @@
import frappe
from frappe.utils import cint
no_cache = 1
def get_context(context):
frappe.db.commit() # nosemgrep
context = frappe._dict()
context.boot = get_boot()
return context
def get_boot():
return frappe._dict(
{
"site_name": frappe.local.site,
"read_only_mode": frappe.flags.read_only,
"csrf_token": frappe.sessions.get_csrf_token(),
"setup_complete": cint(frappe.get_system_settings("setup_complete")),
}
)