diff --git a/erpnext/schools/api.py b/erpnext/schools/api.py
index eb9aac2d8b..316f0dd5b4 100644
--- a/erpnext/schools/api.py
+++ b/erpnext/schools/api.py
@@ -74,15 +74,15 @@ def make_attendance_records(student, student_name, status, course_schedule=None,
:param course_schedule: Course Schedule.
:param status: Status (Present/Absent)
"""
- student_attendance = frappe.db.get_value("Student Attendance", filters = {
+ student_attendance_list = frappe.get_list("Student Attendance", fields = ['name'], filters = {
"student": student,
"course_schedule": course_schedule,
"student_batch": student_batch,
"date": date
})
- if student_attendance:
- student_attendance = frappe.get_doc("Student Attendance", student_attendance)
+ if student_attendance_list:
+ student_attendance = frappe.get_doc("Student Attendance", student_attendance_list[0])
else:
student_attendance = frappe.new_doc("Student Attendance")
student_attendance.student = student
diff --git a/erpnext/schools/doctype/student_attendance_tool/student_attendance_tool.js b/erpnext/schools/doctype/student_attendance_tool/student_attendance_tool.js
index 1718292d40..20fb2fdf41 100644
--- a/erpnext/schools/doctype/student_attendance_tool/student_attendance_tool.js
+++ b/erpnext/schools/doctype/student_attendance_tool/student_attendance_tool.js
@@ -121,7 +121,7 @@ schools.StudentsEditor = Class.extend({
return !stud.disabled && !stud.checked;
});
- frappe.confirm(__("Do you want to save attendance?
Present: {0}\
+ frappe.confirm(__("Do you want to update attendance?
Present: {0}\
Absent: {1}", [students_present.length, students_absent.length]), function() {
frappe.call({
method: "erpnext.schools.api.mark_attendance",
diff --git a/erpnext/schools/doctype/student_language/student_language.json b/erpnext/schools/doctype/student_language/student_language.json
index b9de961e7e..f3b4eb1347 100644
--- a/erpnext/schools/doctype/student_language/student_language.json
+++ b/erpnext/schools/doctype/student_language/student_language.json
@@ -2,7 +2,7 @@
"allow_copy": 0,
"allow_import": 0,
"allow_rename": 0,
- "autoname": "",
+ "autoname": "field:language_name",
"beta": 0,
"creation": "2017-02-21 01:55:00.366273",
"custom": 0,
@@ -17,7 +17,7 @@
"bold": 0,
"collapsible": 0,
"columns": 0,
- "fieldname": "student_language",
+ "fieldname": "language_name",
"fieldtype": "Data",
"hidden": 0,
"ignore_user_permissions": 0,
@@ -26,7 +26,7 @@
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
- "label": "Student Language",
+ "label": "Language Name",
"length": 0,
"no_copy": 0,
"permlevel": 0,
@@ -52,7 +52,7 @@
"issingle": 0,
"istable": 0,
"max_attachments": 0,
- "modified": "2017-02-21 02:23:47.196351",
+ "modified": "2017-02-22 13:03:48.600707",
"modified_by": "Administrator",
"module": "Schools",
"name": "Student Language",
diff --git a/erpnext/schools/doctype/student_language/student_language.py b/erpnext/schools/doctype/student_language/student_language.py
index 748b9fd276..be6d5debe4 100644
--- a/erpnext/schools/doctype/student_language/student_language.py
+++ b/erpnext/schools/doctype/student_language/student_language.py
@@ -7,6 +7,4 @@ import frappe
from frappe.model.document import Document
class StudentLanguage(Document):
-
- def validate(self):
- self.name = self.student_language
+ pass