diff --git a/erpnext/patches/v7_2/rename_att_date_attendance.py b/erpnext/patches/v7_2/rename_att_date_attendance.py index 78d3220b0e..f7caf706db 100644 --- a/erpnext/patches/v7_2/rename_att_date_attendance.py +++ b/erpnext/patches/v7_2/rename_att_date_attendance.py @@ -4,11 +4,11 @@ from frappe.model.utils.rename_field import update_reports, update_users_report_ def execute(): if "att_date" not in frappe.db.get_table_columns("Attendance"): return - frappe.reload_doc("HR", "doctype", "attendance") + frappe.reload_doc("hr", "doctype", "attendance") frappe.db.sql("""update `tabAttendance` set attendance_date = att_date - where (att_date is not null or att_date != '') and (attendance_date is null or attendance_date = '')""") + where attendance_date is null or attendance_date = '' or attendance_date = '0000-00-00'""") update_reports("Attendance", "att_date", "attendance_date") update_users_report_view_settings("Attendance", "att_date", "attendance_date") - update_property_setters("Attendance", "att_date", "attendance_date") \ No newline at end of file + update_property_setters("Attendance", "att_date", "attendance_date")