fix: do not get password if client_secret is not set (#28547)

diff --git a/erpnext/regional/india/e_invoice/utils.py b/erpnext/regional/india/e_invoice/utils.py
index afcbc37..1ae24e1 100644
--- a/erpnext/regional/india/e_invoice/utils.py
+++ b/erpnext/regional/india/e_invoice/utils.py
@@ -646,9 +646,14 @@
 		request_log.save(ignore_permissions=True)
 		frappe.db.commit()
 
+	def get_client_credentials(self):
+		if self.e_invoice_settings.client_id and self.e_invoice_settings.client_secret:
+			return self.e_invoice_settings.client_id, self.e_invoice_settings.get_password('client_secret')
+
+		return frappe.conf.einvoice_client_id, frappe.conf.einvoice_client_secret
+
 	def fetch_auth_token(self):
-		client_id = self.e_invoice_settings.client_id or frappe.conf.einvoice_client_id
-		client_secret = self.e_invoice_settings.get_password('client_secret') or frappe.conf.einvoice_client_secret
+		client_id, client_secret = self.get_client_credentials()
 		headers = {
 			'gspappid': client_id,
 			'gspappsecret': client_secret