1
0
forked from test/crm

chore: capture basic telemetry

This commit is contained in:
Shariq Ansari 2024-01-23 15:41:32 +05:30
parent 4305c97a83
commit d1ad5bfcc8

View File

@ -2,8 +2,8 @@
# GNU GPLv3 License. See license.txt
from __future__ import unicode_literals
import frappe
from frappe.utils.telemetry import capture
no_cache = 1
@ -11,4 +11,6 @@ no_cache = 1
def get_context(context):
csrf_token = frappe.sessions.get_csrf_token()
frappe.db.commit()
context.csrf_token = csrf_token
if frappe.session.user != "Guest":
capture("active_site", "crm")
context.csrf_token = csrf_token