fix: added billing.py to handle csrf token issue
This commit is contained in:
parent
eb55ff194a
commit
b77810322d
1 changed files with 22 additions and 0 deletions
22
frappe/www/billing.py
Normal file
22
frappe/www/billing.py
Normal 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")),
|
||||
}
|
||||
)
|
||||
Loading…
Add table
Reference in a new issue