Skip to content

Commit

Permalink
Fixed api params.
Browse files Browse the repository at this point in the history
  • Loading branch information
Knucklessg1 committed May 16, 2024
1 parent e60a4f1 commit 0250d1f
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
3 changes: 1 addition & 2 deletions servicenow_api/servicenow_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -770,8 +770,7 @@ def get_change_requests(self, **kwargs) -> Response:
try:
response = self._session.get(
url=f"{self.url}/sn_chg_rest"
f"/change{change_request.change_type}"
f"{change_request.api_parameters}{offset}",
f"/change{change_request.api_parameters}{offset}",
headers=self.headers,
verify=self.verify,
proxies=self.proxies,
Expand Down
4 changes: 2 additions & 2 deletions servicenow_api/servicenow_models.py
Original file line number Diff line number Diff line change
Expand Up @@ -401,9 +401,9 @@ def validate_change_type(cls, v):
Raises:
- ParameterError: If 'change_type' is not a valid change type.
"""
if v not in ["emergency", "normal", "standard", "model"]:
if v.lower() not in ["emergency", "normal", "standard", "model"]:
raise ParameterError
return v
return v.lower()

@field_validator("association_type")
def validate_association_type(cls, v):
Expand Down

0 comments on commit 0250d1f

Please sign in to comment.