From 0d38a6b4956a0324bbdfd91f62fb55c28931bbce Mon Sep 17 00:00:00 2001 From: bcornwellmott Date: Tue, 30 May 2017 03:26:02 -0700 Subject: [PATCH] Fix grammar error in HR Training Results (#9076) * Fix Typo in message Issue #9074 * Added condition for notifying user of grade. --- erpnext/hr/doctype/training_result/training_result.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/erpnext/hr/doctype/training_result/training_result.py b/erpnext/hr/doctype/training_result/training_result.py index 16b76a7e19..36c3cb93bc 100644 --- a/erpnext/hr/doctype/training_result/training_result.py +++ b/erpnext/hr/doctype/training_result/training_result.py @@ -13,7 +13,9 @@ class TrainingResult(Document): def send_result(self): for emp in self.employees: - message = "Thank You for attending {0}. You grade is {1}".format(self.training_event, emp.grade) + message = "Thank You for attending {0}.".format(self.training_event) + if emp.grade: + message = message + "Your grade: {0}".format(emp.grade) frappe.sendmail(frappe.db.get_value("Employee", emp.employee, "company_email"), \ subject=_("{0} Results".format(self.training_event)), \ content=message)