mirror of
https://github.com/frappe/erpnext.git
synced 2026-06-01 19:29:10 +00:00
fix: using db.exists and get_value instead of get_doc
This commit is contained in:
@@ -25,9 +25,9 @@ class TaxJarSettings(Document):
|
|||||||
|
|
||||||
custom_fields = []
|
custom_fields = []
|
||||||
for dt in ['Item', 'Sales Invoice Item']:
|
for dt in ['Item', 'Sales Invoice Item']:
|
||||||
doc = frappe.get_doc('Custom Field', {'dt': dt, 'fieldname':'product_tax_category'})
|
doc = frappe.db.exists('Custom Field', {'dt': dt, 'fieldname':'product_tax_category'})
|
||||||
custom_fields.append(doc)
|
custom_fields.append(doc)
|
||||||
fields_hidden = doc.get('hidden') if doc else 0
|
fields_hidden = frappe.db.get_value('Custom Field', {'dt': dt, 'fieldname':'product_tax_category'},'hidden')
|
||||||
fields_already_exist = True if custom_fields else False
|
fields_already_exist = True if custom_fields else False
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user