fix: add error prompt for wrong date range

This commit is contained in:
Kenneth Sequeira 2020-06-23 16:55:35 +05:30
parent dee1c92df1
commit f5b7bd9dcb

View File

@ -9,6 +9,9 @@ from frappe.utils.nestedset import get_descendants_of
def execute(filters=None):
filters = frappe._dict(filters or {})
if filters.from_date > filters.to_date:
frappe.throw(_('From Date cannot be greater than To Date'))
columns = get_columns(filters)
data = get_data(filters)