fix: no server side validations for accounts in asset category

This commit is contained in:
Saqib Ansari
2020-03-28 18:44:53 +05:30
parent 9578ead7f9
commit 086e5c4dac

View File

@@ -31,7 +31,7 @@ class AssetCategory(Document):
if d.get(account):
account_type = frappe.db.get_value('Account', d.get(account), 'account_type')
if account_type != account_type_map[account]['account_type']:
frappe.throw(_("Row {}: {} should be a {} account".format(d.idx, frappe.bold(frappe.unscrub(account)),
frappe.throw(_("Row {}: Account Type of {} should be {} account".format(d.idx, frappe.bold(frappe.unscrub(account)),
frappe.bold(account_type_map[account]['account_type']))), title=_("Invalid Account"))