From dbc69da409d31bcefc8b15001fcda2260cbdd2a9 Mon Sep 17 00:00:00 2001 From: Mangesh-Khairnar Date: Sat, 31 Aug 2019 14:28:02 +0530 Subject: [PATCH] fix: minor fixes --- .../v12_0/move_credit_limit_to_customer_credit_limit.py | 3 ++- erpnext/selling/doctype/customer/test_customer.py | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) 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