From 79872bf62c727bb795a2af2a1d19e13316716797 Mon Sep 17 00:00:00 2001 From: shreyas Date: Tue, 26 Jan 2016 13:57:06 +0530 Subject: [PATCH] [Refactor]Changed variable name to avoid conflict between args and local variable --- erpnext/accounts/party.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/erpnext/accounts/party.py b/erpnext/accounts/party.py index 59a6782f58..60eb770076 100644 --- a/erpnext/accounts/party.py +++ b/erpnext/accounts/party.py @@ -309,12 +309,12 @@ def set_taxes(party, party_type, posting_date, company, customer_group=None, sup return get_tax_template(posting_date, args) -def validate_party_frozen_disabled(party, party_type): - if party_type and party: - party = frappe.db.get_value(party_type, party, ["is_frozen", "disabled"], as_dict=True) +def validate_party_frozen_disabled(party_name, party_type): + if party_type and party_name: + party = frappe.db.get_value(party_type, party_name, ["is_frozen", "disabled"], as_dict=True) if party.disabled: - frappe.throw("{0} {1} is disabled".format(party_type, party), PartyDisabled) + frappe.throw("{0} {1} is disabled".format(party_type, party_name), PartyDisabled) elif party.is_frozen: frozen_accounts_modifier = frappe.db.get_value( 'Accounts Settings', None,'frozen_accounts_modifier') if not frozen_accounts_modifier in frappe.get_roles(): - frappe.throw("{0} {1} is frozen".format(party_type, party), PartyFrozen) + frappe.throw("{0} {1} is frozen".format(party_type, party_name), PartyFrozen)