From 42aaf81280531d8a4e3ed2cf4c7bbfe69c915f28 Mon Sep 17 00:00:00 2001 From: Viswas Date: Wed, 6 Nov 2024 13:44:10 +0530 Subject: [PATCH] fix: fix export url generation for sandbox accounts --- fyle_netsuite_api/utils.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/fyle_netsuite_api/utils.py b/fyle_netsuite_api/utils.py index f4cc03f5..c70de7a2 100644 --- a/fyle_netsuite_api/utils.py +++ b/fyle_netsuite_api/utils.py @@ -45,6 +45,9 @@ def generate_netsuite_export_url(response_logs : OrderedDict, netsuite_credentia if response_logs: try: ns_account_id = netsuite_credentials.ns_account_id.lower() + if '_sb' in ns_account_id: + ns_account_id = ns_account_id.replace('_sb', '-sb') + export_type = response_logs['type'] if 'type' in response_logs and response_logs['type'] else 'chargeCard' internal_id = response_logs['internalId'] redirection = EXPORT_TYPE_REDIRECTION[export_type]