From 14ed4b8c891fe05e1732d0cb407c61cdfd2b58c3 Mon Sep 17 00:00:00 2001 From: Nilesh Pant <58652823+NileshPant1999@users.noreply.github.com> Date: Tue, 13 Jun 2023 16:59:38 +0530 Subject: [PATCH] bug fix: additional conditional for customer entity (#119) --- netsuitesdk/errors/parser.py | 5 +++++ setup.py | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/netsuitesdk/errors/parser.py b/netsuitesdk/errors/parser.py index a8b4e07..55d1f33 100644 --- a/netsuitesdk/errors/parser.py +++ b/netsuitesdk/errors/parser.py @@ -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 diff --git a/setup.py b/setup.py index e42eb32..a5e82a7 100644 --- a/setup.py +++ b/setup.py @@ -5,7 +5,7 @@ setuptools.setup( name='netsuitesdk', - version='2.19.0', + version='2.19.1', author='Siva Narayanan', author_email='siva@fyle.in', description='Python SDK for accessing the NetSuite SOAP webservice',