From 346a6a5d841c9372156f815985b1d45913f81001 Mon Sep 17 00:00:00 2001 From: Nabin Hait Date: Tue, 13 Dec 2016 11:27:46 +0530 Subject: [PATCH] Update set_sales_person_status.py --- erpnext/patches/v7_1/set_sales_person_status.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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"))""")