From 012df5b68d70e524fad7b2f929960be6ef2f150b Mon Sep 17 00:00:00 2001 From: knucklessg1 Date: Mon, 20 May 2024 11:10:38 -0500 Subject: [PATCH] Fixed looking for data, not name_value_pairs --- servicenow_api/servicenow_api.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/servicenow_api/servicenow_api.py b/servicenow_api/servicenow_api.py index 3af44ab..2949436 100644 --- a/servicenow_api/servicenow_api.py +++ b/servicenow_api/servicenow_api.py @@ -1385,7 +1385,7 @@ def create_change_request(self, **kwargs) -> Union[Response, requests.Response]: :raises ParameterError: If JSON serialization or deserialization fails. """ change_request = ChangeManagementModel(**kwargs) - if change_request.name_value_pairs is None: + if change_request.data is None: raise MissingParameterError if change_request.standard_change_template_id: standard_change_template_id = ( @@ -1434,7 +1434,7 @@ def create_change_request_task( change_request = ChangeManagementModel(**kwargs) if ( change_request.change_request_sys_id is None - or change_request.name_value_pairs is None + or change_request.data is None ): raise MissingParameterError try: @@ -1659,7 +1659,7 @@ def update_change_request(self, **kwargs) -> Union[Response, requests.Response]: change_request = ChangeManagementModel(**kwargs) if ( change_request.change_request_sys_id is None - or change_request.name_value_pairs is None + or change_request.data is None ): raise MissingParameterError if change_request.change_type: @@ -1743,7 +1743,7 @@ def update_change_request_task( if ( change_request.change_request_sys_id is None or change_request.change_request_task_sys_id is None - or change_request.name_value_pairs is None + or change_request.data is None ): raise MissingParameterError try: