feat(dashboard): Use caching decorator for dashboard

This commit is contained in:
Aditya Hase 2019-02-06 10:14:21 +05:30
parent 76158e6643
commit 1e0f9a2882

View File

@ -6,12 +6,13 @@ from itertools import groupby
from operator import itemgetter
import json
import frappe
from frappe.core.page.dashboard.dashboard import cache_source
from frappe.utils import add_to_date, date_diff, getdate, nowdate
from erpnext.accounts.report.general_ledger.general_ledger import execute
@frappe.whitelist()
@cache_source
def get(filters=None):
filters = json.loads(filters)
timespan = filters.get("timespan")
timegrain = filters.get("timegrain")
account = filters.get("account")