mirror of
https://github.com/frappe/erpnext.git
synced 2026-05-31 10:49:09 +00:00
fix(minor): update_start_end_date_for_old_shift_assignment.py
This commit is contained in:
@@ -7,4 +7,7 @@ import frappe
|
|||||||
|
|
||||||
def execute():
|
def execute():
|
||||||
frappe.reload_doc('hr', 'doctype', 'shift_assignment')
|
frappe.reload_doc('hr', 'doctype', 'shift_assignment')
|
||||||
frappe.db.sql("update `tabShift Assignment` set end_date=date, start_date=date where date IS NOT NULL and start_date IS NULL and end_date IS NULL;")
|
if frappe.db.has_column('Shift Assignment', 'date'):
|
||||||
|
frappe.db.sql("""update `tabShift Assignment`
|
||||||
|
set end_date=date, start_date=date
|
||||||
|
where date IS NOT NULL and start_date IS NULL and end_date IS NULL;""")
|
||||||
|
|||||||
Reference in New Issue
Block a user