From 14cac48fa2be75c77e7eeb221d5cbfa397ee6f67 Mon Sep 17 00:00:00 2001 From: Hrishabh Tiwari Date: Tue, 30 Apr 2024 10:53:00 +0530 Subject: [PATCH 1/3] fixed nonetype issue in vendor tax --- netsuitesdk/api/vendor_bills.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/netsuitesdk/api/vendor_bills.py b/netsuitesdk/api/vendor_bills.py index 02132e8..fc9c1ed 100644 --- a/netsuitesdk/api/vendor_bills.py +++ b/netsuitesdk/api/vendor_bills.py @@ -126,9 +126,10 @@ def post(self, data) -> OrderedDict: if 'taxDetailsList' in data: tax_details_list = [] - for tdl in data['taxDetailsList']['taxDetails']: - tax_details_list.append(self.ns_client.TaxDetails(**tdl)) - vb['taxDetailsList'] = self.ns_client.TaxDetailsList(taxDetails=tax_details_list) + if 'taxDetails' in data['taxDetailsList']: + for tdl in data['taxDetailsList']['taxDetails']: + tax_details_list.append(self.ns_client.TaxDetails(**tdl)) + vb['taxDetailsList'] = self.ns_client.TaxDetailsList(taxDetails=tax_details_list) logger.debug('able to create vb = %s', vb) res = self.ns_client.upsert(vb, 'bills') From bfc55c268ea3c3a4b75c8435c8b67d54f074c218 Mon Sep 17 00:00:00 2001 From: Hrishabh Tiwari Date: Tue, 30 Apr 2024 11:01:48 +0530 Subject: [PATCH 2/3] fixes to vendor tax --- netsuitesdk/api/vendor_bills.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/netsuitesdk/api/vendor_bills.py b/netsuitesdk/api/vendor_bills.py index fc9c1ed..778cd13 100644 --- a/netsuitesdk/api/vendor_bills.py +++ b/netsuitesdk/api/vendor_bills.py @@ -124,7 +124,7 @@ def post(self, data) -> OrderedDict: if 'taxDetailsOverride' in data: vb['taxDetailsOverride'] = data['taxDetailsOverride'] - if 'taxDetailsList' in data: + if 'taxDetailsList' in data and data['taxDetailsList']: tax_details_list = [] if 'taxDetails' in data['taxDetailsList']: for tdl in data['taxDetailsList']['taxDetails']: From c21fcc17c2d2013573e801edce800d2ff2f3eb80 Mon Sep 17 00:00:00 2001 From: Hrishabh Tiwari Date: Tue, 30 Apr 2024 11:22:36 +0530 Subject: [PATCH 3/3] Bump Version --- setup.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup.py b/setup.py index d0c3154..908dd4a 100644 --- a/setup.py +++ b/setup.py @@ -5,7 +5,7 @@ setuptools.setup( name='netsuitesdk', - version='2.21.2', + version='2.21.3', author='Siva Narayanan', author_email='siva@fyle.in', description='Python SDK for accessing the NetSuite SOAP webservice',