Skip to content

Commit

Permalink
fixed nonetype issue in vendor tax (#128)
Browse files Browse the repository at this point in the history
* fixed nonetype issue in vendor tax

* fixes to vendor tax

* Bump Version
  • Loading branch information
Hrishabh17 authored Apr 30, 2024
1 parent 9a9bd64 commit 33ba398
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
9 changes: 5 additions & 4 deletions netsuitesdk/api/vendor_bills.py
Original file line number Diff line number Diff line change
Expand Up @@ -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')
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

setuptools.setup(
name='netsuitesdk',
version='2.21.2',
version='2.21.3',
author='Siva Narayanan',
author_email='[email protected]',
description='Python SDK for accessing the NetSuite SOAP webservice',
Expand Down

0 comments on commit 33ba398

Please sign in to comment.