mirror of
https://github.com/frappe/erpnext.git
synced 2026-02-13 01:34:10 +00:00
fix: wrong company selected when marking attendance for all employees (#27685)
* fix: wrong company selected when marking attendance for all employees * fix: enable caching for repeated queries of the same employee Co-authored-by: Ankush Menat <ankushmenat@gmail.com> Co-authored-by: Ankush Menat <ankushmenat@gmail.com>
This commit is contained in:
committed by
GitHub
parent
471a8ddce0
commit
b478e72cef
@@ -55,8 +55,7 @@ def mark_employee_attendance(employee_list, status, date, leave_type=None, compa
|
||||
else:
|
||||
leave_type = None
|
||||
|
||||
if not company:
|
||||
company = frappe.db.get_value("Employee", employee['employee'], "Company")
|
||||
company = frappe.db.get_value("Employee", employee['employee'], "Company", cache=True)
|
||||
|
||||
attendance=frappe.get_doc(dict(
|
||||
doctype='Attendance',
|
||||
@@ -68,4 +67,4 @@ def mark_employee_attendance(employee_list, status, date, leave_type=None, compa
|
||||
company=company
|
||||
))
|
||||
attendance.insert()
|
||||
attendance.submit()
|
||||
attendance.submit()
|
||||
Reference in New Issue
Block a user