From d9b342f2579fbca48070b99c9b1b91fa197a2c28 Mon Sep 17 00:00:00 2001 From: "mergify[bot]" <37929162+mergify[bot]@users.noreply.github.com> Date: Fri, 24 Jan 2025 14:18:04 +0530 Subject: [PATCH] fix: remove unnecessary auth from plaid connector (backport #44305) (#45421) fix: remove unnecessary auth from plaid connector (#44305) (cherry picked from commit e82911041d49116a061bb7af9b195b5f01c2f92f) Co-authored-by: Martin Luessi --- .../doctype/plaid_settings/plaid_connector.py | 16 ---------------- 1 file changed, 16 deletions(-) diff --git a/erpnext/erpnext_integrations/doctype/plaid_settings/plaid_connector.py b/erpnext/erpnext_integrations/doctype/plaid_settings/plaid_connector.py index f44fad333cf..cb9f49e8c28 100644 --- a/erpnext/erpnext_integrations/doctype/plaid_settings/plaid_connector.py +++ b/erpnext/erpnext_integrations/doctype/plaid_settings/plaid_connector.py @@ -69,23 +69,7 @@ class PlaidConnector: else: return response["link_token"] - def auth(self): - try: - self.client.Auth.get(self.access_token) - except ItemError as e: - if e.code == "ITEM_LOGIN_REQUIRED": - pass - except APIError as e: - if e.code == "PLANNED_MAINTENANCE": - pass - except requests.Timeout: - pass - except Exception as e: - frappe.log_error("Plaid: Authentication error") - frappe.throw(_(str(e)), title=_("Authentication Failed")) - def get_transactions(self, start_date, end_date, account_id=None): - self.auth() kwargs = dict(access_token=self.access_token, start_date=start_date, end_date=end_date) if account_id: kwargs.update(dict(account_ids=[account_id]))