fix: Maintenance Schedule child table status for legacy data (#27554)

* fix: Maintenance Schedule child table status for legacy data

* fix: Include legacy draft schedules in patch

* fix: Pre-commit formatting

(cherry picked from commit cc143bca0d)

# Conflicts:
#	erpnext/patches/v13_0/set_status_in_maintenance_schedule_table.py
This commit is contained in:
Marica
2021-09-30 14:08:45 +05:30
committed by Mergify
parent f5160dc83d
commit 33c8f03b31

View File

@@ -2,6 +2,7 @@ import frappe
def execute():
<<<<<<< HEAD
frappe.reload_doc("maintenance", "doctype", "Maintenance Schedule Detail")
frappe.db.sql(
"""
@@ -10,3 +11,10 @@ def execute():
WHERE docstatus < 2
"""
)
=======
frappe.db.sql("""
UPDATE `tabMaintenance Schedule Detail`
SET completion_status = 'Pending'
WHERE docstatus < 2
""")
>>>>>>> cc143bca0d (fix: Maintenance Schedule child table status for legacy data (#27554))