From b75e77a2cc64931f8765b5769e177253aab2f6cf Mon Sep 17 00:00:00 2001 From: Shreya Shah Date: Tue, 5 Jun 2018 10:33:29 +0530 Subject: [PATCH] Fix syntax (#14342) --- erpnext/education/doctype/student/student.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/erpnext/education/doctype/student/student.py b/erpnext/education/doctype/student/student.py index 841c2e88c4..53bf6f7273 100644 --- a/erpnext/education/doctype/student/student.py +++ b/erpnext/education/doctype/student/student.py @@ -26,12 +26,12 @@ class Student(Document): if not meta.issingle: if "student_name" in [f.fieldname for f in meta.fields]: frappe.db.sql("""UPDATE `tab{0}` set student_name = %s where {1} = %s""" - .format(d, linked_doctypes[d]["fieldname"]),(self.title, self.name)) + .format(d, linked_doctypes[d]["fieldname"][0]),(self.title, self.name)) if "child_doctype" in linked_doctypes[d].keys() and "student_name" in \ [f.fieldname for f in frappe.get_meta(linked_doctypes[d]["child_doctype"]).fields]: frappe.db.sql("""UPDATE `tab{0}` set student_name = %s where {1} = %s""" - .format(linked_doctypes[d]["child_doctype"], linked_doctypes[d]["fieldname"]),(self.title, self.name)) + .format(linked_doctypes[d]["child_doctype"], linked_doctypes[d]["fieldname"][0]),(self.title, self.name)) def check_unique(self): """Validates if the Student Applicant is Unique"""