Skip to content

Commit

Permalink
Fixed looking for data, not name_value_pairs
Browse files Browse the repository at this point in the history
  • Loading branch information
Knucklessg1 committed May 20, 2024
1 parent 0344494 commit 012df5b
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions servicenow_api/servicenow_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -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 = (
Expand Down Expand Up @@ -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:
Expand Down Expand Up @@ -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:
Expand Down Expand Up @@ -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:
Expand Down

0 comments on commit 012df5b

Please sign in to comment.