Skip to content

Commit

Permalink
bug fix: additional conditional for customer entity (#119)
Browse files Browse the repository at this point in the history
  • Loading branch information
NileshPant1999 authored Jun 13, 2023
1 parent b7228e6 commit 14ed4b8
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
5 changes: 5 additions & 0 deletions netsuitesdk/errors/parser.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,11 @@ def get_entity_values(self, error_dict):
object_2 = self.get_instance(convert_to_camelcase(entity_keys[1]), error_dict[entity_keys[1]])

if object_1 and object_2:
if entity_keys[0] == 'customer' and entity_keys[1] == 'employee':
object_1 = object_1['entityId']
object_2 = object_2['email'] if object_2['email'] else object_2['firstName'] + " " + object_2['lastName']
return object_1, object_2

if entity_keys[1] == 'employee':
object_2 = object_2['email'] if object_2['email'] else object_2['firstName'] + " " + object_2['lastName']
return object_1['name'], object_2
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.19.0',
version='2.19.1',
author='Siva Narayanan',
author_email='[email protected]',
description='Python SDK for accessing the NetSuite SOAP webservice',
Expand Down

0 comments on commit 14ed4b8

Please sign in to comment.