From 3476a457ad8448cc5648d3027d76fb0a97cc4c5c Mon Sep 17 00:00:00 2001 From: Nabin Hait Date: Fri, 25 Jan 2019 16:22:36 +0530 Subject: [PATCH] fix: minor --- erpnext/accounts/deferred_revenue.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/erpnext/accounts/deferred_revenue.py b/erpnext/accounts/deferred_revenue.py index 2ff2644d185..9ff8b042810 100644 --- a/erpnext/accounts/deferred_revenue.py +++ b/erpnext/accounts/deferred_revenue.py @@ -29,7 +29,7 @@ def validate_service_stop_date(doc): if date_diff(item.service_stop_date, item.service_end_date) > 0: frappe.throw(_("Service Stop Date cannot be after Service End Date")) - if old_stop_dates and old_stop_dates[item.name] and item.service_stop_date!=old_stop_dates[item.name]: + if old_stop_dates and old_stop_dates.get(item.name) and item.service_stop_date!=old_stop_dates[item.name]: frappe.throw(_("Cannot change Service Stop Date for item in row {0}".format(item.idx))) def convert_deferred_expense_to_expense(start_date=None, end_date=None):