fix(setup_taxes): Pop if frappe.message_log (#15611)
This commit is contained in:
parent
063cf9c582
commit
c2857fd2cc
@ -50,7 +50,7 @@ def make_tax_account(company, account_name, tax_rate):
|
|||||||
"tax_rate": flt(tax_rate) if tax_rate else None
|
"tax_rate": flt(tax_rate) if tax_rate else None
|
||||||
}).insert(ignore_permissions=True, ignore_mandatory=True)
|
}).insert(ignore_permissions=True, ignore_mandatory=True)
|
||||||
except frappe.NameError:
|
except frappe.NameError:
|
||||||
frappe.message_log.pop()
|
if frappe.message_log: frappe.message_log.pop()
|
||||||
abbr = frappe.get_cached_value('Company', company, 'abbr')
|
abbr = frappe.get_cached_value('Company', company, 'abbr')
|
||||||
account = '{0} - {1}'.format(account_name, abbr)
|
account = '{0} - {1}'.format(account_name, abbr)
|
||||||
return frappe.get_doc('Account', account)
|
return frappe.get_doc('Account', account)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user