fix: update set_value query

This commit is contained in:
Anuja Pawar 2021-11-01 11:38:02 +05:30
parent 19f78c2f31
commit dd3cadd46b

View File

@ -81,9 +81,7 @@ def update_gst_category(doc, method):
for link in doc.links:
if link.link_doctype in ['Customer', 'Supplier']:
if doc.get('gstin'):
gst_category = frappe.db.get_value(link.link_doctype, link.link_name, 'gst_category')
if gst_category == 'Unregistered':
frappe.db.set_value(link.link_doctype, link.link_name, 'gst_category', 'Registered Regular')
frappe.db.set_value(link.link_doctype, { 'name': link.link_name, 'gst_category': 'Unregistered' }, 'gst_category', 'Registered Regular')
def set_gst_state_and_state_number(doc):
if not doc.gst_state: