Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fixed nonetype issue in vendor tax #128

Merged
merged 3 commits into from
Apr 30, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading