From 58ab922f8ce7912d734f0a578aef5b113196d86c Mon Sep 17 00:00:00 2001 From: ljain112 Date: Fri, 20 Sep 2024 20:47:43 +0530 Subject: [PATCH] fix: do not set options for non Autocomplete field (cherry picked from commit 18408e29bf16248f36ff67c17bcefbb40249742e) --- india_compliance/gst_india/client_scripts/party.js | 1 + 1 file changed, 1 insertion(+) diff --git a/india_compliance/gst_india/client_scripts/party.js b/india_compliance/gst_india/client_scripts/party.js index fdea52d27..f6e7931d5 100644 --- a/india_compliance/gst_india/client_scripts/party.js +++ b/india_compliance/gst_india/client_scripts/party.js @@ -149,6 +149,7 @@ async function set_gstin_options(frm) { frm._gstin_options_set_for = frm.doc.name; const field = frm.get_field("gstin"); + if (!field || field.df.fieldtype != "Autocomplete") return; field.df.ignore_validation = true; field.set_data(await india_compliance.get_gstin_options(frm.doc.name, frm.doctype)); }