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)