diff --git a/erpnext/patches/v12_0/move_credit_limit_to_customer_credit_limit.py b/erpnext/patches/v12_0/move_credit_limit_to_customer_credit_limit.py index 58ad337b34..0b3da20986 100644 --- a/erpnext/patches/v12_0/move_credit_limit_to_customer_credit_limit.py +++ b/erpnext/patches/v12_0/move_credit_limit_to_customer_credit_limit.py @@ -17,7 +17,8 @@ def execute(): def move_credit_limit_to_child_table(): ''' maps data from old field to the new field in the child table ''' - if not frappe.db.has_column('Customer', 'bypass_credit_limit_check_at_sales_order'): + fields="" + if frappe.db.has_column('Customer', 'bypass_credit_limit_check_at_sales_order'): fields = ", bypass_credit_limit_check_at_sales_order" credit_limit_data = frappe.db.sql(''' SELECT diff --git a/erpnext/selling/doctype/customer/test_customer.py b/erpnext/selling/doctype/customer/test_customer.py index 8ea4964047..1ef2aabead 100644 --- a/erpnext/selling/doctype/customer/test_customer.py +++ b/erpnext/selling/doctype/customer/test_customer.py @@ -25,7 +25,7 @@ class TestCustomer(unittest.TestCase): make_test_records('Item') def tearDown(self): - frappe.db.set_value("Customer", {'parent': '_Test Customer', 'company': '_Test Company'}, 'credit_limit', 0.0) + frappe.db.set_value("Customer Credit Limit", {'parent': '_Test Customer', 'company': '_Test Company'}, 'credit_limit', 0.0) def test_party_details(self): from erpnext.accounts.party import get_party_details