diff --git a/erpnext/patches/v7_1/set_sales_person_status.py b/erpnext/patches/v7_1/set_sales_person_status.py index 4eb4b25943b..929beac27f4 100644 --- a/erpnext/patches/v7_1/set_sales_person_status.py +++ b/erpnext/patches/v7_1/set_sales_person_status.py @@ -4,4 +4,5 @@ import frappe def execute(): frappe.reload_doc('setup','doctype','sales_person') frappe.db.sql("""update `tabSales Person` set enabled=1 - where employee IN (select employee from tabEmployee where status != "Left")""") \ No newline at end of file + where (employee is null or employee = '' + or employee IN (select employee from tabEmployee where status != "Left"))""")