diff --git a/netsuitesdk/api/vendor_bills.py b/netsuitesdk/api/vendor_bills.py index 02132e8..778cd13 100644 --- a/netsuitesdk/api/vendor_bills.py +++ b/netsuitesdk/api/vendor_bills.py @@ -124,11 +124,12 @@ 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 = [] - 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') 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',