Update update_start_end_date_for_old_shift_assignment.py

This commit is contained in:
Anurag Mishra 2020-08-17 13:43:33 +05:30 committed by GitHub
parent 6f1579da1f
commit 13be09e883
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -7,4 +7,4 @@ import frappe
def execute():
frappe.reload_doc('hr', 'doctype', 'shift_assignment')
frappe.db.sql("update `tabShift Assignment` set end_date=date, start_date=date, status='Inactive' where date IS NOT NULL and start_date IS NULL and end_date IS NULL;")
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;")